Documentation Center

tcdl:navigation

The <tcdl:navigation> tag generates navigation links to related items in a Web page. Each navigation section comprises a header, navigation links and footer sections. A navigation section is generated for each related facet; a facet is an attribute in Fredhopper that can be used for navigating content. You define what attributes are facets in the Business Manager.

Description

When handling a query (a normal query or a search query), Fredhopper builds a facet map containing a collection of facets which relate to the query.

When you implement navigation, Experience Optimization will first loop over the facet collection and create a navigation section for each facet. Each <tcdl:navigationSection> tag contains:
  • A header section.
  • A section containing navigation links.
  • A footer section.

Syntax

<tcdl:query id='query2' timeout='2000' publication='tcm:0-3-1' allowDuplicates='true'>
	<tcdl:search type='parameter' value='s'/>
	<tcdl:items>
		<h3>Showing #{items.size} search items of #{itemsTotalCount}</h3>
		<tcdl:itemTemplate>
			<tcdl:ComponentPresentation ComponentURI='#{item.componentUri}' TemplateURI='#{item.templateUri}' Type='Dynamic'/>
		</tcdl:itemTemplate>
	</tcdl:items>
	<tcdl:navigation>
		<tcdl:itemTemplate>    
			<tcdl:navigationSection>            
				<h2>#{section.title} (#{links.size})</h2><br/>
				<tcdl:itemTemplate>
					<tcdl:navigationLink />
				</tcdl:itemTemplate>
			</tcdl:navigationSection>
		</tcdl:itemTemplate>
	</tcdl:navigation>
</tcdl:query>

Attributes

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

AttributeDescription
showCategoriesSet to true to display the Categories facet (the default facet provided in Business Manager), otherwise just the facets you have created in the Business Manager. The default is false.
varSet the name of the item collection (by default, set to sections)