Common web part properties

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

Many of web parts use the same or similar properties. The following table summarizes the most important properties found in most web parts:

 

General properties

 

Property Name

Description

Sample Value

Hide on sub-pages

Indicates if web part should be hidden on sub-pages. If you check this box, the web part will be displayed only on the page that uses the page template with this web part and it will be hidden on sub-pages that inherit the page template.


ID

Web part unique identifier.

text1

Visible

Indicates if web part is visible.


Show for document types

Indicates for which document types should the web part be displayed. If the type of the currently selected document is different, the web part is not displayed.

cms.news;cms.event

Display to roles

The list of roles who should see the web part. If now role is specified, the web part is displayed to all roles.

cmseditors;customrole

 

HTML envelope

 

Property Name

Description

Sample Value

Web part container

Container displayed around the web part. The containers can be defined in Site Manager -> Development -> Web part containers.


Web part container title

Title displayed in the web part container (if it supports displaying of title).

Latest news

Content before

Text to be displayed before the web part.

<table style="background-color: red"><tr><td>

Content after

Text to be displayed after the web part.

</td></tr></table>

 

The structure of the web part and its envelope looks like this:

 

clip0584

 

You can find more details on web part containers in chapter Containers overview.

 

Content

 

Property Name

Description

Sample Value

Path

Path of the documents to be displayed.  See Appendix B - Path expressions for details.

/news/%

Highlighted node path

Alias path of the node that should be selected in the menu control. If you do not specify any value, the current path is used.

/products/nokia

Query

Name of the query to be used for retrieving data from Kentico CMS Database. The queries can be defined in Site Manager -> Document types -> edit some document type -> Queries.

cms.news.selectlatest

 

Content filter

 

Property Name

Description

Sample Value

Document types

Types of documents that should be displayed, separated with a semicolon (;).

 

In case of menu and navigation web parts, the page (cms.menuitem) documents are selected by default.

 

The other web parts retrieve all documents without their custom fields by default.

 

Please note: if you specify more than one document type, only common data fields from the View_CMS_Tree_Joined view will be available in the web part (in transformations, WHERE condition and ORDER BY expressions).

cms.article;cms.news;cms.menuitem

Combine with default culture

Indicates if default language version of the document should be displayed if the document is not translated to the current language.

You can choose from yes and no or you can choose to use web site-level settings.

Culture code

Culture version of the displayed content.

en-us

Maximum nesting level

Maximum nesting level. It specifies the number of sub-levels in the content tree that should included in the displayed content.

 

Value 1 indicates that only the current document should be returned.

Value -1 indicates all child documents.


ORDER BY expression

ORDER BY part of the SELECT query.

ProductName ASC, ProductPrice DESC

Select only published

Indicates if only published documents should be displayed.


Site name

Code name of the web site from which you want to display the content.

 

If you leave the value empty, the content is retrieved from the current web site.

CorporateSite

WHERE condition

WHERE part of the SELECT query.

ProductPrice > 100 AND ProductColor='green'

Filter out duplicate documents

If the displayed data contains multiple links to the same document (see Linked docs for details), you can choose to display only one of them.


 

System settings

 

Property Name

Description

Sample Value

Check permissions

Indicates if permissions should be checked for the displayed content and only the documents for which the current user has the "read" permission should be displayed.


Cache item name

Name of the cache item. If not explicitly specified, the name is automatically created based on the control unique ID.

 

You can assign the same value of this property if you want to display the same content on several pages and do not want the system to keep the same items in memory redundantly.

latestnewslist

Cache minutes

The number of minutes for which the content is kept in the cache until the latest version is reloaded from the database.

 

If you specify 0, the content is not cached.

 

If you specify -1, the site-level settings are used.

10

 

Design

 

Property Name

Description

Sample Value

CSS prefix

Prefix used for CSS class names. This property allows you to set up different CSS styles for particular menu levels. Every level of the menu will use the prefix for CSS class names that you specify.

Main;Sub1;Sub2

Highlight all items in path

Indicates if all items in the currently selected path of the menu control should be displayed as highlighted.


Submenu indicator

Sub-menu indicator image

/images/submenu.gif

Use alternating styles

Indicates if odd and even items should have different styles.


 

Paging

 

Property Name

Description

Sample Value

Enable paging

Indicates if displayed data should be paged.


Page size

Number of records per page.

10

Pager position

Position of the pager - top or bottom


Show first and last buttons

Indicates if First and Last buttons should be displayed.


Query string key

The name of the URL parameter that will contain the current page number.

mylistpage

Paging mode

Type of paging parameter - it can be passed either through URL (Query string) or through postback (Postback).


 

Relationships

 

These settings allow you to configure the web part so that it displays only content that is in relation with given (main) document.

 

Property Name

Description

Sample Value

Main document

Document for which you want to display its related documents.


Relationship  name

Name of the relationship between documents.

Is related to

Main document is on the left side

Indicates if the given document is on the left side of the relationship.


 

No data behavior

 

Property Name

Description

Sample Value

Hide if no record found

Indicates if content should be hidden when no record is found.


No record found text

Text that should be displayed if no data is found.

No data found.

 

Editing buttons

 

Property Name

Description

Sample Value

Show New button

Indicates if the button for adding new items should be displayed in the editing mode when viewing the page.


New button text

New button description text.

Add new news.

Show edit and delete buttons

Indicates if edit and delete buttons should be automatically shown for each item in the editing mode.


 

Transformations

 

Property Name

Description

Sample Value

Alternating transformation

Transformation used in the list view mode for even items.

cms.news.preview_alternating

Transformation

Transformation used in the list view mode.

cms.news.preview

Selected item transformation

Transformation used in the detail view mode.

cms.news.default

Item separator

Item separator displayed between records.

<hr/>

 

Page url: http://devnet.kentico.com/docs/devguide/index.html?common_web_part_properties.htm