Documentation Center

tcdl:search (deprecated)

The (deprecated) <tcdl:search> tag displays Promotions based on search terms or synonyms of search terms. Search functionality within Experience Optimization is deprecated as of the SDL Tridion Sites 9 release.

Syntax

<tcdl:query allowDuplicates='true'> 
      <tcdl:search type='parameter' value='q' /> 

      <tcdl:promotions region='Sidebar' maxItems='1'> 
           <tcdl:itemTemplate> 
                <tcdl:promotionalItems> 
                     <tcdl:itemTemplate> 
                          <tcdl:ComponentPresentation ComponentURI='##componentUri##' TemplateURI='##templateUri##' Type='Dynamic'/> 
                     </tcdl:itemTemplate> 
                </tcdl:promotionalItems> 
           </tcdl:itemTemplate> 
           <tcdl:fallbackContent> 
           ...
           </tcdl:fallbackContent> 
      </tcdl:promotions> 

</tcdl:query>   

You can only use one <tcdl:search> tag in a <tcdl:query>. Experience Optimization only supports single keyword look-ups: for example, car travel is treated as one search term (it does not return results for each search term in the string).

You can handle content items related to the search query using the <tcdl:items> tag. Be sure to place the <tcdl:search> tag before other tags (such as <tcdl:promotions> or <tcdl:items>) in a <tcdl:query> to ensure that the query is updated with the search term.

Attributes

The <tcdl:search> tag has type and value attributes:

AttributeValueDescription
typeparameterRetrieves the search terms entered by the user from the URL query string. Specify the name of the query string parameter in which you pass search terms in the value attribute.

If the search terms are not available in the query string, use the keyword search type.

typereferrerUses the search terms entered in a search engine to search for Promotions.

By default, Experience Optimization provides support for Google, Bing, Yahoo, and Altavista search engines. You can configure support for other search engines in the smarttarget.referrers.xml.

The value attribute is not required when using type referrer.

typekeywordUses the search terms specified in the webpage. To implement a keyword search you need to add code to your published webpages to pass the search term values to Experience Optimization.
idString(Optional) A string identifier for the Server Control or custom tag generated (for server-side programming).