Web Search Server Control

The Web Search server control lets you customize the behavior of the search. You place this control on any Web form from which a site visitor can search your site. For more information about the site visitor experience, see Web Site Search

Property Usage Table

Properties in the Search server control generally affect the control in one of three ways:

Search Display - the Web Search server control’s appearance on your site.

Search Criteria - criteria used to search the site

Search Results Display - appearance of search results on your site

The following table shows which properties are associated with each category. See Also: WebSearch Property Descriptions

Search Display

Search Criteria

Search Results Display

ButtonImgSrc

ButtonText

DisableForumSearch

EnableAdvanced Link

Hide

Language

MaxCharacters

ShowSearchOptions

Text Box Size

WrapTag

CustomSearch

FolderID

Language

Recursive

SearchFor

ShowCategories

ShowSearchOptions

ShowSuggested Results

CustomOrderBy

DynamicContentTemplate

DisplayXslt

Hide

Language

LinkTarget

MaxTeaserLength

OrderBy

OrderDirection

RemoveTeaserHtml

ResultsPageSize

ResultTagId

ShowCustomSummary

ShowSearchBoxAlways

WebSearch Property Descriptions

The following table describes the Web Search server control properties. See Also: Property Usage Table

Note: The following table only lists Ektron-specific properties. It does not describe native .NET properties such as font, height, width and border style. For documentation of these properties, see Visual Studio help.

Property

Description

Data Type

Authenticated

Indicates if you are logged in to the CMS
Explorer. If logged in, you can browse to the folder needed for the FolderID property.

See Also: Using CMS Explorer to Browse Your Ektron CMS400.NET Site

String

ButtonImgSrc

If you want to display an image on the submit button, enter the server path to it.

String

ButtonText

The text used for the button if no image source is identified. If an image source is identified, this is alternative text for the button.

String

CustomOrderBy

Provide a property’s Friendly Name defined in the Indexing Service to sort search results by that property. For example, if you define DocAuthor, results will be sorted by the document’s author.

Results can be ascending or descending based on OrderDirection. If you enter an invalid property, no search results are returned.

If you specify CustomOrderBy and OrderBy, the OrderBy property is ignored. The Friendly Name of a property can be found in Computer Management > Services and Applications > Indexing Service > Your Index > Properties > Friendly Name column.

String

CustomSearch

If you want the search to include folders that are not part of Ektron CMS400.NET, enter the folder names here. Separate multiple items with a comma.

You do not need to enter the folder path, but it must reside within the site root folder.

See Also: Using the Integrated Search

String

DisableForumSearch

Set to true if you want to remove Forums from the dropdown list that appears on the Search server control (see image below).

The default value is false.

Boolean

Regardless of this setting, if a user selects Site (the first option in the dropdown), forum posts are searched.

DisplayXslt

Determines the display of the search results page.

None - databind only

ecmNavigation - lists the title of every content item found by the search

ecmTeaser - lists the title and summary of every content item found by the search.

ecmUnOrderedList - sorts the list in no particular order. Shows the title and content summary.

Path to Custom Xslt - Enter the path to an Xslt that determines the display of the page.

Warning! If you specify an external file, it is strongly recommended that you do not store this file in your site's Workarea folder. If you store this file in the Workarea folder, the file will be lost when you upgrade.

Warning! If you enter a valid EkML file at the MarkupLanguage property, this property value is ignored.

See Also: Determining the Display of Search Results

ecmNavigation -Using the Collection Server Control

ecmTeaser - Using the Collection Server Control

String

 

DoInitFill

By default, Fill occurs during the Page_Init event. Set to false if you want to postpone the fill-action until later. In this case, FIll is automatically called during the Page Render event.

You might do this if you need to set or change a property on the control in codebehind and have it render with your changes shown.

Boolean

DynamicContentTemplate

Sets the template for dynamic content. This property overrides any quicklink template for the content.

String

EnableAdvancedLink

Set to true to display an additional tab (Advanced) on the Search control.

See Also: The Advanced Search

Boolean

FolderID

The folder at which the search begins. The starting folder need not be the root folder.

The Recursive property determines if the search examines this folder’s subfolders.

See Also: Using CMS Explorer to Browse Your Ektron CMS400.NET Site

String

Hide

Used to hide WebSearch Server Control in design time and runtime.

True = Hide control

False = Show control

Boolean

Language

If the template on which this server control resides includes a language selection control, and you want to let the site visitor select the language, enter zero (0).

Otherwise, click the field, then the ellipsis button () and a popup box appears. Select a language from the list.

This property shows results in design-time (in Visual Studio) and at run-time (in a browser).

Integer

LinkTarget

Defines how a link on the search results display acts when clicked. The choices are:

_blank - loads the link in a new blank window. This window is not named.

_self - loads the link in the same window the anchor was clicked in. This is useful for overriding a globally assigned base target.

_parent - loads the link in the immediate frameset parent of the document. This defaults to acting like “_self” if the document has no parent.

_top - loads the link in the full body of the window. This defaults to acting like “_self” if the document is already at the top. It is useful for breaking out of an arbitrarily deep frame nesting.

String

MarkupLanguage

Identify the template markup file that controls the display of search results. For example, mysearchmarkup.ekml.

If the *.ekml file is located in the same folder as the Web form containing the server control, just enter its name. If the file is in another folder, enter the path relative to site root. For example, \siteroot\workarea\customfiles
\markup\mysearchmarkup.ekml
.

Note: If you enter a valid EkML file, the Displayxslt property is ignored.

See Also:

Determining the Display of Search Results

Controlling Output with Ektron Markup Language

websearch.ekml

String

MaxCharacters

The maximum number of characters the Search text box accepts.

If you enter a value less than 50, set the TextBoxSize property to the same number.

Integer

MaxTeaserLength

Limits the length of any returned content’s abstract. To allow unlimited length, set to zero.

This property is active only if both of these conditions are true.

you use the DisplayXslt property to identify an xslt and ecmteaser as a value of that property.

If you enter an .ekml file at the MarkupLanguage property, this value is ignored.

the ShowCustomSummary property is set to false. If it is set to true, the entire summary appears in search results.

Integer

OrderBy

The order of search results. For example, you want to sort search results by last modified date.

Title - The content title (alphabetical)

ID - The content ID number

Date Created - The date the content was created

Date Modified - The date the content was most recently modified

Editor - The user who last edited the content (alphabetical)

Rank - The rank assigned to the content. See Also: Search Result Ranking

Note: The Order Direction field determines the direction of the search results. For example, if you sort by ID and Order Direction is set to Descending, the results sort by ContentID number with the highest number at the top of the list.

String

OrderDirection

The direction in which search results are sorted. The default is Ascending.

Ascending - Alphabetical results from A to Z; numeric values low to high; dates from oldest to most recent

Descending - Alphabetical results from Z to A; numeric values high to low; dates from most recent to oldest

String

Recursive

Determines whether to search sub-folders of the starting folder. The starting folder is identified in the FolderID property. 

Boolean

RemoveTeaserHTML

Set to true if you want to remove HTML tags from the content summary when it appears in search results.

Boolean

ResultsPageSize

Use to set the maximum number of results on a page. If a search returns more than this number of results, the following text appears below the last one:

Result Page: 1 2 3 Next

The user can click Next or a number to view additional results.

This property defaults to the value set at the ek_PageSize element in the web.config file.

Property’s Effect on Suggested Results

Only the number of Suggested Results up to this maximum appear. If more than this number should display, they do not.

This is unlike natural search results, whose additional links are available via numbers below the maximum page size.

See Also: Suggested Results

Integer

ResultTagId

Lets you designate where search results appear. You can place search criteria in one area of a Web form and the results in another.

For example, you have the following tag.

<span id=”results”></span>

In this case, enter results for this property value.

See Also: ResultTagId

String

SearchFor

Choose the type of content to search.

All

HTML

Documents

Images

Multimedia

Discussion Forums

Tags

eCommerce Products

Pagebuilder

If the value is anything other than All, this server control only looks though the selected content type.

Warning! When this property is set to anything other than All, the search options drop down does not appear.

String

SearchSynonyms

If set to true, the Synonym Search is incorporated into the search logic.

If false, Synonym Sets are ignored.

See Also: Synonym Sets

Boolean

ShowCategories

If set to true, when this server control appears, the user see a Filter by Category option. This option helps a site visitor zero in on relevant content.

If false, the Filter by Category option does not appear.

Note: To see the Filter by Category option, the ShowSearchBoxAlways property must be set to true.

See Also: Filtering Search Results by Category

Boolean

ShowCustomSummary

If set to true, the search results display the content item’s summary instead of the characterization.

Note: If this property is set to true, the MaxTeaserLength property is ignored. So, the entire summary appears with search results, regardless of length.

If false, the search results display the characterization.

The default is false.

See Also: Display of Search Results

Boolean

ShowSearchBoxAlways

If set to true, the search box appears on the PostBack screen.

If false, the search box does not appear on the PostBack screen.

The default is true.

Boolean

ShowSearchOptions

If set to true, the following dropdown options appear to the right of the Search box.

A site visitor can click an option to limit the search by content type. If the user accepts the default value, Site, all content types are searched.

Warning! If the SearchFor property is set to anything other than All, the search options drop down does not appear. See Also: SearchFor

Note: If the DisableForumSearch property is set to true, Forums does not appear in the dropdown list.

Boolean

ShowSuggestedResults

If set to true, Suggested Results related to the search term appear.

If false, Suggested Results do not appear.

Note: If the ResultsPageSize property is set it to less than the number of suggested results applied to a term or synonym set, only the property’s number of results appears. For example, if you assign five links to a Suggested Result set but set ResultsPageSize to three, only the first three results appear.

See Also: Suggested Results

Boolean

Stylesheet

Specify the location of a style sheet to use for the search results page. Set the location relative to the site root folder. For example: Workarea\csslib\mytest.css

Leave blank to use the default style sheet, \webroot\Workarea\csslib\search.css.

Warning! If you enter a valid EkML file at the MarkupLanguage property, or a value at the DisplayXslt property, this property is ignored.

See Also:  Determining the Display of Search Results

String

SuppressWrapperTags

Suppresses the output of span/div tags around the control. The default is False.

True - Suppress wrap tags.

False - Allow wrap tags.

Boolean

TaxonomyOperator

Select whether to use an And or Or operator when filtering results by taxonomy. By default, the property is set to Or. This allows for a wider range of returned results.

And - Only results that match all categories selected in the Filter by Category tree appear. For example, if you are searching for a medical document in the Hospital and Doctor’s Office categories, the document must be assigned to both categories or it is not shown.

Or - when more than one category is selected in the Filter by Category tree, results must match at least one category to be shown.

Note: For this property to be active, the ShowCategories property must be set to True.

See Also: Filtering Search Results by Category

Enum -TaxCategoryOperator

TextBoxSize

The size of the Search text box for user input. The width is based on the number of characters.

Integer

WrapTag

Use to specify a server control’s tag. The default is Span.

Span - designates an in-line portion of an HTML document as a span element.

Div - use when you want to apply attributes to a block of code.

Custom - use a custom tag.

String

ResultTagId

The ResultTagId property lets you designate where search results appear. So, you can place search criteria in one area of a Web form and the results in another.

For example, you have the following tag: <span id=”results”></span>

You would enter results for the property value, as shown below.

Previous TopicNext Topic|