Search Display Function

The search display custom tag creates the area where search results appear after a search is executed.

Here is the format of the ecmSearchDisplay tag.

<% ecmSearchDisplay

“MaxNumberReturn”,

“StyleInfo”,

ShowDate

 

 

%>

Below is a description of the tag’s attributes.

Attribute

Description

Required

For more information, see

Max Number of content blocks Returned

Maximum number of content blocks returned. (0=Unlimited)

Yes

Max Number of Content Blocks Returned

Style Info

An HTML style string used within the HTML “hyperlink” generated by the search output. Can control font, color, size, etc.

No

Style Info

ShowDate

Displays the last modified date of the content block. 0=No 1=Yes

No

Show Date

Search Display Example

Insert the following on the page that displays search results. You may place it on the same page as the search tag or a separate page.

<tr>

<td>

<% ecmSearchDisplay 0,"","1" %>

</td>

</tr>

This search display example has the following properties:

Returns unlimited results when the search is performed.

Contains no style information.

Shows the last modified date of the content.

Search Display with Default Content

You can also set up the search display tag to display a default content block if a search is not performed. Then, if a search is performed, the results replace the content block. The sample code below does that:

<tr>

<% if (Request.Form("ecmsearchtype") <> "") then %>

<td>

<% ecmSearchDisplay 0,"" %>

</td>

<% else %>

<td>

<% ecmContentBlock(1) %>

</td>

<% end if %>

</tr>

Search Display Attributes

Listed below are the attributes for the SearchDisplay tag.

Max Number of Content Blocks Returned

This attribute determines the number of search results displayed on a page. You may enter any integer. To display unlimited results, enter 0 (zero).

Max Returns

Web Page View

0

3

Style Info

An HTML style string used within the HTML “hyperlink” generated by the search output. Can control font, color, size, etc.

Style Info

Web Page View

““

“font-family:arial; font-weight:bold; background-color:#cccccc; border:solid blue 1pt; margin:2px; width:50%;”

Show Date

This attribute determines if the content block’s last modified date appears next to the title. This is useful when determining which content block is the most recent. You have two choices.

Attribute

Web Page View

0

1

Previous TopicNext Topic|