Documentation Center

tcdl:query

The <tcdl:query> tag defines a query for retrieving content that is displayed in a Page Region.

Syntax

<tcdl:region id="Sidebar" type="SmartTarget"> 
    <tcdl:query publication='tcm:0-1-1'> 
        <tcdl:facet category='tcm:1-3-4' /> 

        <tcdl:promotions region='Sidebar' maxItems='5'> 
            <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> 
</tcdl:region>

Attributes

The <tcdl:query> tag has the following attributes:

AttributeDescription
idA unique String value identifying a query.
publicationThe Web site Publication TCM URI from which to retrieve content for promotions (used only with the tcdl:facet tag).
allowDuplicates

Boolean to display content (promotional items) already displayed in preceding regions on this Page or not:

  • true—promotions already in the output of preceding regions on this Page may also be displayed in this page region.
  • false—promotions already in the output of preceding regions will be filtered out of the results.
timeout The length of time, expressed in milliseconds, to wait for the result of the query to be received before fallback content is displayed in a Experience Optimization region. If specified, the setting overrides the default timeout in the smarttarget_conf.xml file.
viewNot Supported—see known issues.
redirectBoolean to redirect certain search queries to specific pages.

Set to true (the default) to automatically redirect the user based on redirects that you have defined in the Business Manager. Set to false to manage the redirects manually.