Kentico CMS 6.0 Controls

Configuration

Configuration

Previous topic Next topic Mail us feedback on this topic!  

Configuration

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

The following properties of the CMSSearchResults control can be set or used in the API:

 

Property Name

Description

Sample Value

CacheDependencies

List of the cache keys on which the cached data depends. When the cache item changes, the cache of the control is cleared. Each item (dependency) must be on one line.

 

If you leave this property empty, default dependencies will be used.

cms.user|all

CacheItemName

Name of the cache item the control will use.

 

By setting this name dynamically, you can achieve caching based on a URL parameter or some other variable - simply enter the value of the parameter.

 

If no value is set, the control stores its content in the item named "URL|ControlID".

"mycachename" +

Request.QueryString["id"].ToString()

CacheMinutes

Number of minutes the retrieved content is cached for.

 

Zero indicates that the content will not be cached.

 

-1 indicates that the site-level settings should be used.

 

This parameter allows you to set up caching of content so that it doesn't have to be retrieved from the database each time a user requests the page.


CheckPermissions

Allows you to specify whether to check permissions of the current user. If the value is 'false' (default value) no permissions are checked. Otherwise, only nodes for which the user has read permission are selected.

 

ClassNames

Specifies which document type should be selected. Several values separated by a semicolon can be entered.

"cms.news"

or

"cms.news;cms.article"

CMSSearchDialogID

You can use this property to specify the ID of the source CMSSearchDialog control that provides search parameters.

"CMSSearchDialog1"

CombineWithDefaultCulture

Indicates whether documents from the default culture version should be used if they are not available in the selected culture.  This property is applied only if you do not set the TreeProvider property manually.

 

CultureCode

Culture code of documents to be selected, such as en-us. If not specified, it's read from the user's session or the default value is used.

"en-us"

DataSource

Gets or sets a DataSet containing values used to fill the items of the control.

 

EnablePaging

Enables the paging of search results. True by default.

 

FilterControl

Gets or sets the appropriate filter control used to limit the data read by this control.

 

FilterName

Gets or sets the code name of the appropriate filter control used to limit the data read by this control.

 

FilterOutDuplicates

Indicates if duplicated (linked) documents should be filtered out from the data.

 

IgnoreTransformations

Indicates whether the TransformationName property should be ignored and the templates for direct access (described further below) used instead.

 

NoResultsLabel

The label control that should be displayed when there are no results.

 

OrderBy

ORDER BY part of the SQL statement.

"NewsReleaseDate DESC"

PagerControl

DataPager object used for the paging of search results.

 

QueryStringKey

Name of the query string parameter that contains the current page number (if paging is used).

"pagenumber"

SearchExpression

Word(s) to be searched for.

 

SearchMode

Search mode - any word, all words or exact phrase.

"AllWords"

"AnyWord"

"ExactPhrase"

SearchScope

Indicates whether all content or only the current section should be searched.

"SearchAllContent"

"SearchCurrentSection"

SelectOnlyPublished

Indicates whether only published documents should be selected.

 

SiteName

Specifies the site code name.


StopProcessing

Indicates if processing of the control should be stopped and the control should not retrieve or display any data.

 

TagKey

Overrides the generation of the SPAN tag with a custom tag.

 

TransformationName

Name of the transformation applied to displayed search results in format <document type code name>.<transformation name>.

 

The default transformation is cms.root.searchresults.

"cms.searchresults"

WhereCondition

WHERE clause used for the SQL search queries.

" DocumentModifiedWhen > '1/1/2007' "

OrderBy

ORDER BY clause used for the SQL search queries.

"DocumentModifiedWhen DESC"

 

The CMSSearchResults control accepts the following querystring (URL) parameters:

 

Parameter Name

Description

Sample Value

searchtext

Searched text.

products

searchmode

Search mode.

allwords

exactphrase

anyword (default value)