Show Menu
TOPICS×

Templates

Templates

Presentation template tags

A list of site search/merchandising tags and attributes for presentation templates.
A presentation template is an HTML file that includes presentation template tags that site search/merchandising defines. These tags indicate how the search results that customers see are formatted.
You can select from the following presentation tag groups:

Declarations

Declarations are special guided-declare tags that you can set at the top of a top-level presentation template. Any subsequent declarations are ignored, including declarations in included templates.
Tag
Description
1
<guided-content-type-header content="content-type">
By default the presentation template is sent back with a mime-type of text/html. You can change what content-type is used with this tag.
Declare this tag as high as possible in your presentation template. Do not add other text on the same line with this tag.
2
<guided-xml-declare [charset="charset"]>
If you are returning XML, you can use this tag to create the XML declaration. Make this tag the first line in your presentation template. When you use this tag, the content-type is automatically set to text/xml, unless you overrule it with <guided-content-type-header> in the first line. If you do not specify a charset, it defaults to UTF-8. This tag results in the following output in your XML document:
<?xml version="1.0" encoding="charset-name" standalone="yes" ?>

Results

Tag
Description
1
<guided-results [gsname="searchname"]></guided-results>
The guided-results tag defines the boundaries of a results loop. Any set of results can be accessed by specifying a gsname attribute. If no gsname is given, then the default search results are displayed.
2
<guided-result-link [gsname="fieldname"] [attr="value"]+></guided-result-link>
To create a link to a given result, use the guided-result-link tag. By defining a gsname attribute, you can use a field from the index instead of the standard "loc" tag that references the "search-url". Any other attributes, such as class and target, can be passed as well, which are output in the resulting anchor tag.
3
<guided-result-img gsname="fieldname" [attr="value"]+>
The <guided-result-img> tag helps create image tags rather than embedding variables inside a raw img tag.
Specify the field to use for the image path in the gsname attribute. The result is an img tag with any standard HTML attributes that you defined, passed through. So, the following example:
<guided-result-img gsname="thumbnail"  class="thumb" border="0"/>
becomes:
<img src="prod8172.jpg" class="thumb"  border="0"/>
4
<guided-result-field gsname="fieldname" [escape="html|url|js|json|ijson|0"]/>
Any piece of information to present in the results is displayed as a <guided-result-field> tag (except when using auto-generating tags such as the <guided-result-img> tag).
Specify the name of the Search index field in gsname . The exact string passed is output in the template.
You can specify an escape option if you want this field escaped differently from what was specified in the transport template.
This encoding is applied on top of whatever encoding was specified in the transport template.
5
<guided-if[-not]-result-field gsname="fieldname></guided-if-result-field>
This set of conditional tags is true if there is content in the specific field to display. If no content exists, the condition is false. You can use the tags to decide whether surrounding HTML is displayed or not displayed if a value does not exist, or if a different image is displayed, and so on.
<guided-if-result-field gsname="thumbnail">     <guided-result-img gsname="thumbnail" class="thumb" /> <guided-else-result-field>     <img src="nothumb.jpg" class="nothumb" /> </guided-if-result-field>
6
<guided-if[-not]-result-wrap> <guided-else-result-wrap> </guided-if[-not]-result-wrap>
When displaying results in columns, this tag is used to identify whether the current result marks the end of a column.
When the Boolean condition is true, HTML is added to the end of the result to finish off the row and start a new one. When it is the last one, a new row is not started.
See <guided-if-not-last> to learn more about that tag.
<guided-if-result-wrap>      </div>      <guided-if-not-last>          <div>      </guided-if-not-last>  </guided-if-result-wrap>
7
<guided-results-found [gsname="searchname"]/>
Returns a 1 if the back-end search request returned results and 0 if it did not. If no gsname is specified, the tag assumes the primary search. This tag is useful to pass logic to JavaScript routines.
8
<guided-results-total [gsname="searchname"]/>
Returns the total number of results in the specified results set. Assumes the default search when no gsname is given.
9
<guided-results-lower [gsname="searchname"]/>
Returns the result number of the lower result on the page for the specified results set. Assumes the default search when no gsname is given.
10
<guided-results-upper [gsname="searchname"]/>
Returns the result number of the upper result on the page for the specified results set. Assumes the default search when no gsname is given.
11
<guided-if[-not]-results-found [gsname="searchname"]> <guided-else[-not]-results-found>
  &lt;/guided-if[-not]-results-found&gt; </code> </p> </td> 

Shows content when results are found. Or, shows no results HTML when results are not found.
<guided-if-results-found gsname="products">     <guided-results gsname="products">         ...     </guided-results> <guided-else-results-found>      No results were found. </guided-if-results-found>
12
<guided-result-title/>
The <guided-result-title> tag gives value of title transport template field specified with <title> transport tag.
13
<guided-result-description/>
The <guided-result-description> tag gives value of description transport template field specified with <description> transport tag.
14
<guided-result-loc/>
The < guided-result-loc> tag gives value of loc transport template field specified with <loc> transport tag.
15
<guided-if-result-field gsname="fieldname"> <guided-else-result-field>
  &lt;/guided-if-result-field&gt; </code> </p> </td> 

True if there is content in the specific field to display. If no content exists, the condition is false. Use the tags to decide whether surrounding HTML is displayed or not if a value does not exist, or if a different image is displayed, and so on.
<guided-if-result-field gsname="thumbnail">      <guided-result-img gsname="thumbnail" class="thumb"/> <guided-else-result-field>      <img src="nothumb.jpg" class="nothumb"/> </guided-if-result-field>
16
<guided-result-attribute-table gsname="tablename">
This tag provides a loop through attribute table defined in the transport template with <attribute_table> transport tag. There is <guided-result-attribute-table-field> tag for displaying attribute table field values. Also it is possible to use plain guided-result-field tag inside loop for displaying other result fields.
17
<guided-result-attribute-table-field gsname="fieldname" [escape="html|url|js|json|0"]/>
Displays attribute table field as defined in transport template.
<guided-results>
  ... 
       
      &lt;ul&gt; 
       
      &lt;guided-result-attribute-table&nbsp;gsname="downloads"&gt; 
      &nbsp;&nbsp;&lt;li&gt; 
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a&nbsp;href="&lt;guided-result-attribute-table-field&nbsp;gsname="download_link"&nbsp;/&gt;"&gt; 
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;guided-result-attribute-table-field&nbsp;gsname="download_title"&nbsp;/&gt; 
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/a&gt;&nbsp;(&lt;guided-result-field&nbsp;gsname="title"/&gt;) 
      &nbsp;&nbsp;&lt;/li&gt; 
      &lt;/guided-result-attribute-table&gt; 
       
      &lt;/ul&gt; 
       
      ... 
       
      &lt;/guided-results&gt; </code> </p> </td> 

18
<guided-trace [gsname="searchname"]/>
Outputs the trace information found within the trace data within the general section of the JSON data output by the transport template for the given search.
If no search name is given, default is assumed.
19
<guided-result-trace/>
Outputs the JSON content found within the results > trace information of the JSON data output by the transport template for the current search result.
This tag is only valid within the <guided-results></guided-results> loop.

Facets

Facets are navigational components that let you drill into search results. You can use the facet tags to display various facets on your presentation template. You reference facets by name.
Tag
Description
1
<guided-dynamic-facets></guided-dynamic-facets>
A looping context for any dynamic facets for a given search.
The <guided-facet> presentation template tag is edited so that the gsname attribute is automatically provided by the <guided-dynamic-facets> looping context.
2
<guided-facet-display-name gsname=" facetname "/>
Returns the display label of the facet.
If the facet uses the <display-name> tag on the transport template, the content of that tag becomes the label.
3
<guided-facet-rail></guided-facet-rail>
Defines a section on the presentation template that is used as a repeating pattern for each facet in the facet rail.
Each facet that belongs to the facet rail uses this section to evaluate its output.
The following is an example of a facet rail:
<guided-facet-rail>   <guided-facet>     <guided-facet-display-name/>     ...     </guided-facet>   </guided-facet-rail>
Note that following tags do not need gsname attribute when inside <guided-facet-rail> tag as value is dynamically determined at search time and is properly substituted:
  • guided-facet
  • guided-facet-display-name
  • guided-facet-total-count
  • guided-facet-undo-link
  • guided-facet-undo-path
  • guided-facet-behavior
The sort criteria on the Facet Rail page determines the position of the facets. You can choose the sort order from the Sort Facets Method drop-down list.
This tag can optionally accept a gsname attribute value of _dynamic_facets , which provides a looping context for any dynamic facets for this search. This pre-defined facet rail is also exposed in the Business Rules user interface for action push facet X in facet rail '_dynamic_facets' to position Y ".
4
<guided-facet gsname=" facetname " height=" 60px " width=" 120px "></guided-facet>
Use the guided-facet tag to define an area within which all facet tags relate to a specific facet. This tag is also a Boolean tag that hides all of the content if no values in the facet exist. In such case, there is no point outputting the facet values).
The height and width attributes are optional and the dimensions are specified in pixels (px). The Visual Rule Builder (VRB) uses these two attributes, and displays a dotted box as an interactive placeholder when the facet is hidden.
When the display name is in the facet and the facet is hidden, the name is also hidden. However, if the name is outside the facet, you can hide the name only if a zone tag or a guided-if-facet-visible tag is wrapped around it.
5
<guided-if[-not]-facet-long [gsname="facetname"]></guided-if[-not]-facet-long>
This conditional tag is true when the number of facet values is over the length-threshold defined in the configuration. Use it to display a facet as a different UI element (such as a truncated list or a scroll box) when the list is too long.
<guided-facet name="category">     <guided-if-facet-long>         <select>             <guided-facet-values>                 <guided-facet-option />             </guided-facet-values>         </select>     <guided-else-facet-long>         <guided-facet-values>             <guided-facet-value-link><guided-facet-value /></guided-facet-link>         </guided-facet-values>     </guided-if-facet-long> </guided-facet>
You can also use this condition outside the context of a named guided-facet block by referencing a specific facet directly through use of the gsname attribute.
<guided-if-facet-long gsname="category">     The category facet is very long! </guided-if-facet-long>
6
<guided-if[-not]-facet-selected [gsname="facetname"]></guided-if[-not]-facet-selected>
This conditional tag is true when the facet is clicked at least once and a facet value is currently selected. It is used to show or hide HTML or gs tags depending on whether a facet was clicked.
<guided-facet name="category">     <guided-if-facet-selected>         This facet has been selected.  You can no longer refine it.     <guided-else-facet-selected>     <guided-facet-values>         <guided-facet-value-link><guided-facet-value /></guided-facet-link>     </guided-facet-values>     </guided-if-facet-selected> </guided-facet>
You can also use this condition outside the context of a named guided-facet block by referencing a specific facet directly through use of the gsname attribute.
<guided-if-facet-selected gsname="category">     The category facet is selected! </guided-if-facet-selected>
7
<guided-if[-not]-facet-single [gsname="facetname"]></guided-if[-not]-facet-single>
This conditional tag is true when there is only one facet value. Use the tag to change the display of the facet when it has no ability to refine the results.
<guided-facet name="category">     <guided-if-facet-single>         Facet is not refinable.     <guided-else-facet-single>         <guided-facet-values>             <guided-facet-value-link><guided-facet-value /></guided-facet-link>         </guided-facet-values>     </guided-if-facet-single> </guided-facet>
You can also use this condition outside the context of a named guided-facet block by referencing a specific facet directly through use of the gsname attribute.
<guided-if-facet-single gsname="category">     There is only one value in the category facet! </guided-if-facet-single>
8
<guided-if[-not]-facet-multiselect [gsname="facetname"]></guided-if[-not]-facet-multiselect>
This conditional tag is true when the facet is multi-select. Use the tag to change the display of the facet inside <guided-facet-rail> or <guided-dynamic-facets> tags.
<guided-facet-rail>   <guided-facet>     <guided-facet-display-name/>
  &nbsp;&nbsp;&nbsp;&nbsp;&lt;guided-if-facet-multiselect&gt; 
      &nbsp;... 
      &nbsp;&lt;guided-else-facet-multiselect&gt; 
      &nbsp;... 
      &nbsp;&lt;/guided-if-facet-multiselect&gt; 
      &nbsp;&nbsp;&nbsp;&nbsp;... 
      &nbsp;&nbsp;&nbsp;&nbsp;&lt;/guided-facet&gt; 
      &nbsp;&nbsp;&lt;/guided-facet-rail&gt; </code> </p> </td> 

9
<guided-facet-values [gsname=" facetname "]></guided-facet-values>
This is the facet value loop iterator tag. You can define it within the context of a named guided-facet block, in which case you can omit the gsname . Or, you can define it outside any guided-facet block, but it would require the gsname attribute to identify which set of facet values are displayed.
You can also use this tag to display the facet values outside the context of a named guided-facet block. You reference a specific facet directly by using the gsname attribute.
<script>      registerFacetValues('category', '<guided-facet-values gsname="category"><guided-facet-value/>,</guided-facet-values>'); </script>
10
<guided-facet-value [escape="html|url|js|json|0"]/>
Outputs the string of the current facet value.
By default the value is HTML escaped. You can use the escape option to change how the value is escaped.
11
<guided-facet-count/>
Outputs the number of results that match the current facet value.
12
<guided-facet-value-link [attr="value"]+></guided-facet-value-link>
Creates a link around the facet value string for the site visitor to click. The path is automatically generated to narrow the results by the current facet value. It supports passing any attribute directly to the anchor tag.
<guided-facet-values>     <guided-facet-value-link class="facetlink"><guided-facet-value /></guided-facet-value-link> </guided-facet-values>
13
<guided-if-facet-value-selected> <guided-else-facet- value-selected> </guided-if-facet-value-selected>
Changes the display of the facet value when it is currently selected. If it has already been chosen, in most cases, it is no longer linkable.
<guided-facet-values>      <guided-if-facet-value-selected>          <b><guided-facet-value/></b>      <guided-else-facet-value-selected>          <guided-facet-link><guided-facet-value/></guided-facet-link>         </guided-if-facet-value-selected> </guided-facet-values>
14
<guided-if[-not]-facet-value-ghost> <guided-else[-not]-facet-value-ghost>
  &lt;/guided-if[-not]-facet-value-ghost&gt; </code> </p> </td> 

Changes the display of the facet value when it is a ghost value. When a facet value is a ghost value, it is typically displayed in italic text to indicate that the value is missing or "ghosted".
The following code excerpt is an example of a facet block:
<guided-facet-values>     <guided-if-facet-value-selected>         <b><guided-facet-value /> (<guided-facet-count />)</b>             <guided-else-facet-value-selected>                 <guided-if-facet-value-ghost>                     <i><guided-facet-value /> (0)</i>                 <guided-else-facet-value-ghost>             <guided-facet-link class="link"><guided-facet-value /></guided-facet-link> (<guided-facet-count />)         </guided-if-facet-value-ghost>     </guided-if-facet-value-selected> </guided-facet-values>
15
<guided-facet-undo-link gsname=" facetname "></guided-facet-undo-link>
Displays an undo link for a given facet. If there are multi-select facets, this link deselects all of the given facet's values. Give the facet a name. If the facet is not currently selected then the link is the current path.
The following is an example of this tag's usage:
<guided-if-facet-selected gsname="category">     <guided-facet-undo-link gsname="category">Undo Category</guided-facet-undo-link> </guided-if-facet-selected>
16
<guided-if-facet-long [gsname=" facetname "]> <guided-else-facet-long></guided-if-facet-long>
This conditional tag is true when the number of facet values is over the length-threshold defined in the configuration. Use it to display a facet as a different user interface element (such as a truncated list or a scroll box) when the list is too long.
<guided-facet gsname="category">      <guided-if-facet-long>          <div class="long_facet">              <guided-facet-values>                  <guided-facet-link><guided-facet-value/></guided-facet-link>              </guided-facet-values>          </div>      <guided-else-facet-long>          <div class="facet">              <guided-facet-values>                  <guided-facet-link><guided-facet-value/></guided-facet-link>              </guided-facet-values>          </div>      </guided-if-facet-long>  </guided-facet>
You can also use this condition outside the context of a named guided-facet block by referencing a specific facet directly through use of the gsname attribute.
<guided-if-facet-long gsname="category">      The category facet is very long! </guided-if-facet-long>
17
<guided-if-facet-selected [gsname="facetname"]> <guided-else-facet-selected></guided-if-facet-selected>
This conditional tag is true when the facet is clicked at least once and a facet value is currently selected. It can be used to show or hide HTML or gs tags depending on whether a facet is clicked.
<guided-facet gsname="category">      <guided-if-facet-selected>          This facet has been selected.  You can no longer refine it.      <guided-else-facet-selected>          <guided-facet-values>              <guided-facet-link><guided-facet-value/></guided-facet-link>          </guided-facet-values>      </guided-if-facet-selected> </guided-facet>
You can also use this condition outside the context of a named guided-facet block by referencing a specific facet directly through use of the gsname attribute.
<guided-if-facet-selected gsname="category">      The category facet is selected! </guided-if-facet-selected>
18
<guided-if-facet-single [gsname=" facetname "]> <guided-else-facet-single></guided-if-facet-single>
This conditional tag is true when there is only one facet value. It can be used to change the display of the facet when it has no ability to refine the results.
<guided-facet gsname="category">      <guided-if-facet-single>          Facet is not refinable.      <guided-else-facet-single>          <guided-facet-values>              <guided-facet-link><guided-facet-value/></guided-facet-link>          </guided-facet-values>      </guided-if-facet-single> </guided-facet>
You can also use this condition outside the context of a named guided-facet block by referencing a specific facet directly through use of the gsname attribute.
<guided-if-facet-single gsname="category">      There is only one value in the category facet! </guided-if-facet-single>
19
<guided-if-facet-has-values [gsname=" facetname "]> <guided-else-facet-has-values></guided-if-facet-has-values>
This condition lets you check if the specified facet has any values at all. You can use it for showing another facet instead of an empty one.
20
<guided-facet-total-count gsname=" facetname "/>
Outputs the total number of results that are within the given facet.
21
<guided-facet-value gsname=" associated custom facet value " [escape="html|url|js|json|0"]/>
Outputs the string of a value that is associated with the facet. You can have 0 or more fields associated with a facet. Having associated fields is rare and to support such you configure the transport template.
22
<guided-if-facet-value gsname=" associated custom facet value "/><guided-else-facet-value></guided-if-facet-value>
Tests if the facet value has an associated field value.
23
<guided-facet-link [attr=" value "]+></guided-facet-link>
Creates a link around the facet value string for the customer to click. The path is automatically generated to narrow the results by the current facet value. It supports passing any attribute directly to the anchor tag.
<guided-facet-values>      <guided-facet-link class="facetlink"><guided-facet-value/></guided-facet-link> </guided-facet-values>
24
<guided-facet-value-path [escape="html|url|js|json|0"]/>
Creates your own link to a facet value.
<guided-facet-values>      <guided-lt/>a href="<guided-facet-value-path/>"<guided-gt/><guided-facet-value/></a> </guided-facet-values>
By default, the value is URL escaped. You can, however, add another layer of encoding by specifying which mode of escaping you want to use by way of the escape parameter.
25
<guided-facet-value-children></guided-facet-value-children>
As <guided-facet-values> iterate through each facet value, this tag iterates through all the child values of a nested facet. Inside this tag, use the typical facet tags for creating links, creating undo links, and displaying facet values. This tag must be inside <guided-facet-values> because it does nested looping.
An example of using this tag is the following:
<guided-facet-values>   <guided-facet-link title='<guided-facet-value />'><guided-facet-value /> (<guided-facet-count />)</guided-facet-link>   <guided-if-facet-value-has-children>    <guided-facet-value-children>     <guided-facet-link title='<guided-facet-value />'><guided-facet-value /> (<guided-facet-count />)</guided-facet-link>    </guided-facet-value-children>   </guided-if-facet-value-has-children> </guided-facet-values>
26
<guided-if-facet-value-has-children> <guided-else-facet- value-has-children> </guided-if-facet-value-has-children>
Tests if the current facet value has child values. Recommended to use before using the <guided-facet-value-children> tags. The "else" clause is optional.
27
<guided-if[-not]-facet-value-above-length-threshold>
  &lt;guided-else[-not]-facet-value-above-length-threshold&gt; 
       
      &lt;/guided-if[-not]-facet-value-above-length-threshold&gt; </code> </p> </td> 

Determines if the current facet value within the facet-values loop, is above the length threshold. It is typically used to only display values below the threshold on a long facet (unless the user previously selected a "See more" link displayed beneath the facet).
28
<guided-if[-not]-facet-value-equals-length-threshold>
  &lt;guided-else[-not]-facet-value-equals-length-threshold&gt; 
       
      &lt;/guided-if[-not]-facet-value-equals-length-threshold&gt; </code> </p> </td> 

Determines if the current facet value within the facet-values loop, is equal to the length threshold.
29
<guided-facet-value-undo-link></guided-facet-value-undo-link>
Displays an undo link for a given selected facet value. Use it to display an undo link next to a selected facet value. Because this undo link only undoes that particular selected value, it differs from <guided-facet-undo-link> which deselects all selected values.
Note: If the facet does not have multi-select behavior then the two undo links have the same behavior. That is, the facet can only have one selected value.
If the facet is not currently selected then the link is the current path. Use this tag only within a guided-facet-values loop.
30
<guided-facet-value-undo-path/>
Create your own facet value undo link.
31
<guided-facet-undo-path gsname=" facetname "/>
Create your own facet undo link.
Similar to the <guided-facet-undo-link> tag except that it gives you the raw path to build your own undo link.
32
<guided-if-facet-value-matches facetname=" facetname " value="value"><guided-else-facet-value-matches> </guided-if-facet-value-matches>
Conditionally display HTML when the given facet has the selected or single value "value". This set of tags is often used to display a facet based on the value selected in another facet.
33
<guided-facet-behavior gsname=" facetname "/>
Determine a facet's behavior, such as normal, sticky, or multi-select. It is useful for customers that receive XML results and want to dynamically change how the facet is displayed based on its behavior.
34
<guided-if-facet[-not]-visible gsname=" real_facet "> <guided-else-facet[-not]-visible>
  &lt;/guided-if-facet[-not]-visible&gt; </code> </p> </td> 

The content that this tag wraps is either hidden or revealed based on the visibility state of the facet. If a business rule hides or reveals the facet directly, any content inside the facet is hidden or revealed. It is not necessary for these tags to wrap around the facet.
A common use for this tag is to hide the display name when the name is outside the facet. Wrapping this tag around the display name makes the name disappear when the facet is hidden.
This tag replaces the zone and has many of the same performance benefits as using zones.

Breadcrumb

Tag
Description
1
<guided-breadcrumb [gsname=" breadcrumbname "]></guided-breadcrumb>
The loop tag for the breadcrumb. Any content in between the opening and closing tags is iterated for each query-number of the current state.
If gsname is omitted, then the breadcrumb named "default" is used.
2
<guided-breadcrumb-link [gsname="goto|remove|drop"] [attr="value"]+></guided-breadcrumb-link>
Creates a link in the breadcrumb. The default behavior is the "goto" behavior. If the link behaves differently, use the gsname optional attribute to specify "remove" or "drop". Any attribute included in the tag is passed through to the resulting anchor tag.
<guided-breadcrumb>      <guided-breadcrumb-link gsname="remove" class="bc_link">          <guided-breadcrumb-value/>      </guided-breadcrumb-link> </guided-breadcrumb>
3
<guided-breadcrumb-value />
The value tag prints out the transformed value of the current breadcrumb iteration. It is used only in the context of a guided-breadcrumb block.
<guided-breadcrumb>      <guided-breadcrumb-link>          <guided-breadcrumb-value/>      </guided-breadcrumb-link> </guided-breadcrumb>
4
<guided-breadcrumb-label />
The label tag outputs a label for a breadcrumb value detailing which facet was selected to generate that breadcrumb item. It is only used in the context of a guided-breadcrumb block.
<guided-breadcrumb>      <guided-breadcrumb-link>          <guided-breadcrumb-label/>: <guided-breadcrumb-value/>      </guided-breadcrumb-link> </guided-breadcrumb>
5
<guided-if-breadcrumb-label> <guided-else- breadcrumb-label> <guided-if-breadcrumb-label />
This conditional tag is used to conditionally display content if the current breadcrumb value has a label. It is used to only display labels and relating content when a label actually exists. It is only used in the context of a guided-breadcrumb block.
<guided-breadcrumb>      <guided-breadcrumb-link>          <guided-if-breadcrumb-label>              <guided-breadcrumb-label/>:          </guided-if-breadcrumb-label>      <guided-breadcrumb-value/></guided-breadcrumb-link> </guided-breadcrumb>
6
<guided-breadcrumb-path [gsname="goto|remove|drop"]/>
Used to build your own breadcrumb link.

Menus

Tag
Description
1
<guided-menu gsname="menuname"></guided-menu>
This is the menu value loop iterator tag. Use the gsname attribute to identify which set of menu items is displayed.
2
<guided-menu-item-link [attr="value"]+></guided-menu-item-link>
Gives you the URL for refining the current search for the menu item.
3
<guided-menu-item-option [attr="value"]+ />
Typically a menu is displayed in a select control on a template. This tag makes constructing the select control easier because it generates the HTML for generating the option for the select control.
For example, the following code block:
<select name="sort" onchange="gcGo(this);"> <guided-menu gsname="sort"> <guided-menu-item-option/> </guided-menu> </select>
Can generate HTML like the following:
<select name="sort" onchange="gcGo(this);">   <option value="?sort=relevance;sp_sfvl_field=product-type|category|size;" selected="selected">Sort by Relevance</option>   <option value="?sort=avail-code;sp_sfvl_field=product-type|category|size;">Sort by Availability</option>   <option value="?sort=price;sp_sfvl_field=product-type|category|size;">Sort by Price</option> </select>
4
<guided-menu-item-value />
Returns the string of the value that is associated with the menu.
5
<guided-menu-item-label />
Returns the string of the label that is associated with the menu.
6
<guided-menu-item-path />
Returns the path string. Use the tag if you want to add a parameter to the path and create a custom link.
7
<guided-if-menu-item-selected> <guided-else-menu- item-selected> </guided-if-menu-item-selected>
Returns a 1 or 0 indicating if the current menu item is selected.

Pagenav

The page navigation tags can be used to build a set of links allowing a user to page through the search results.
Tag
Description
1
<guided-pages></guided-pages>
The loop tag for the page navigation. Any content between the opening and closing tags is iterated for each page.
2
<guided-page-link [attr="value"]+></guided-page-link>
Creates a link in the page navigation.
3
<guided-page-link gsname="first|prev|next|last|viewall|viewpages" [attr="value"]+></guided-page-link>
Creates a link to the first, previous, next, or last page. It can also create a link to view all of the pages on one page.
4
<guided-page-number />
Returns a string with the current page number.
5
<guided-if-page-selected> <guided-else-page- selected> </guided-if-page-selected>
This set of conditional tags is true if the page that is currently iterated over is selected. It is typically used to display differently the page number in the page-navigation control.
6
<guided-if[-not]-page-prev> <guided-else-page- prev> </guided-if[-not]-page-prev>
This set of conditional tags is true if the current page has a previous page. It is typically used to display a previous link in the page navigation, when it makes sense.
7
<guided-if[-not]-page-next> <guided-else-page- next> </guided-if[-not]-page-next>
This set of conditional tags is true if the current page has a next page. It is typically used to display a previous link in the page navigation, when it makes sense.
8
<guided-if[-not]-page-viewall> <guided-else-page- viewall> </guided-if[-not]-page-viewall>
When a search returns a large result set you might not want to offer the ability to view all of the results. Therefore, you can use this set of conditional tags to determine when to display the View All link.
9
<guided-if[-not]-page-viewpages> <guided-else-page- viewpages> </guided-if[-not]-page-viewpages>
You can use this set of conditional tags to determine when to display the View Pages link. It is typically used to allow a customer to view certain pages.
10
<guided-if -page-link gsname="first|prev| next|last|viewall|viewpages">
  &lt;guided-else-page-link&gt; 
      &lt;/guided-if[-not]-page-link&gt; </code> </p> </td> 

Tests if the page navigation has a first page, previous page, next page, and so on.
11
<guided-page-total />
Returns a string with the total number of pages of search results.
12
<guided-pagination gsname= "pagination_name"></guided-pagination>
Use the guided-pagination tag to define an area in which all pagination tags relate to a specific pagination setting in case you have few Page Navigation Settings defined.
13
<guided-page-path[gsname="first|prev|
  next|last|viewall|viewpages]/&gt; </code> </p> </td> 

Creates your own link in the page navigation.
14
<guided-if-page-high-eq-last> <guided-else-page- high-eq-last> </guided-if-page-high-eq-last>
Tests if the highest page in the page navigation is equal to the total number of pages.
15
<guided-if-page-low-eq-first> <guided-else-page-low-eq-first> </guided-if-page-low-eq-first>
Tests if the lowest page in the page navigation is equal to the one.
16
<guided-if-page-is-multipage> <guided-else-page-is-multipage> </guided-if-page-is-multipage>
Tests if there is a single page of results or multiple pages of results.

Recent Searches

You can use recent searches tags to build a set of links that let a user quickly run a previous search, as in the following example:
<guided-if-recent-searches> 
    <span>Recent Searches</span><br/> 
    <guided-recent-searches> 
        <guided-recent-searches-link><guided-recent-searches-value></guided-recent-searches-link><br/> 
    </guided-recent-searches> 
    <guided-recent-searches-clear-link>Clear Recent Searches</guided-recent-searches-clear-link> 
</guided-if-recent-searches>

Tag
Description
1
<guided-recent-searches></guided-recent-searches>
The loop tag for recent searches. Any content between the opening and closing tags is iterated for each page.
2
<guided-recent-searches-link [attr="value"]+> </guided-recent-searches-link>
Lets you build a link to a recent search. It supports the passing of any HTML attributes directly to the anchor tag.
3
<guided-recent-searches-path/>
Lets you grab the relative URL path for a recent search, within a guided-recent-searches loop. Typically you would use guided-recent-search-link . However, if you wanted to build your own link you could use this tag. The following is an example:
<guided-lt/>a&nbsp;href="<guided_recent_searches_path>"><guided-recent-searches-value></a>
4
<guided-recent-searches-value>
Lets you grab the query term that is associated with a recent search.
5
<guided-recent-searches-clear-link [attr="value"]+></guided-recent-searches-clear-link>
Lets you offer your customers the ability to clear recently saved searches.
6
<guided-recent-searches-clear-path/>
Returns the path that <guided-recent-searches-clear-link> uses so that you can build your own link.
7
<guided-if-recent-searches> <guided-else-recent-searches>
  &lt;/guided-if-recent-searches&gt; </code> </p> </td> 

Lets you display the recent searches when a customer has performed a recent search.

Did You Mean

You can use Did You Mean tags to build a set of links to suggestions when a search returns no results and the Search term is not in the account's dictionary. The following is an example of using Did You Mean tags:
<guided-if-suggestions> 
    <span>Did You Mean?</span><br/> 
    <guided-suggestions> 
        <guided-suggestion-link><guided-suggestion/></guided-suggestion-link><br/> 
    </guided-suggestions> 
</guided-if-suggestions>

Tag
Description
1
<guided-suggestions></guided-suggestions>
This is the loop tag for looping over the suggestions.
2
<guided-suggestion-link [attr="value"]+></guided-suggestion-link>
Creates a link to the given suggestion.
3
<guided-suggestion-value />
4
<guided-if[-not]-suggestions><guided-else[-not]- suggestions></guided-if[-not]-suggestions>
Lets you test if there are any suggestions.
5
<guided-suggestion-path/>
Returns the path string to the suggestion. You can use it to build your own anchor tag. Typically, guided-suggestion-link is used instead.
6
<guided-suggestion/>
A suggestion.
7
<guided-suggestion-result-count/>
Result count for the suggestion.
8
<guided-if[-not]-suggestion-autosearch> <guided-else[-not]-suggestion-autosearch> </guided-if[-not]-suggestion-autosearch>
Lets you test if autosearch by suggestion on zero results was performed, in case this feature is on.
9
<guided-suggestion-original-query/>
Returns the original query if autosearch was performed.
Example of use:
<guided-if-suggestion-autosearch>     Search for <guided-query-param gsname="q" /> instead of <guided-suggestion-original-query /> </guided-if-suggestion-autosearch>
10
<guided-if[-not]-suggestion-low-results> <guided-else[-not]-suggestion-low-results> </guided-if[-not]-suggestion-low-results>
This condition is true if there are suggestions due to a low result count, in case this feature is on.
The following is an example of using this tag:
<guided-if-suggestion-low-results>    You have a low result count for <guided-query-param gsname="q" />.    Did you mean: <guided-suggestions>        <guided-suggestion-link>           <guided-suggestion />        </guided-suggestion-link><guided-if-not-last>, </guided-if-not-last>    </guided-suggestions> </guided-if-suggestion-low-results>

Autocomplete

The following tags can be used to add autocomplete to your search form. The head-content and form-content tags are required to make autocomplete function correctly. It is recommended you use the tags as opposed to hard coding the autocomplete Javascript and CSS into your presentation template. The reason is because tags enable your templates to pick up any new defeat cache IDs whenever you change your autocomplete settings without the need to manually update your template.
Tag
Description
1
<guided-if-autocomplete> <guided-else-autocomplete> </guided-if-autocomplete>
Detects if the autocomplete feature is enabled. You could use the tags to optionally pick up the head and form content that are required for autocomplete. In turn, this lets you toggle the feature on and off and not have to alter your presentation templates.
2
<guided-ac-css/>
Used in the head of the presentation template and replaced by the appropriate CSS script includes for autocomplete.
3
<guided-ac-form-content/>
Used in the search form (between the <form> and </form> tags) of the presentation template instead of hard coding the autocomplete tags within the form. The tags are replaced with the appropriate HTML that is required to make autocomplete work.
4
<guided-ac-javascript/>
Generates the links to the Autocomplete JavaScript. For best performance it is recommended that you place this tag near the bottom of the page before the closing "body" tag.

Store

Use the following tags to test and display the store that a user is currently in.
Tag
Description
1
<guided-store/>
Outputs the current store.
2
<guided-if-store-defined> <guided-else-store-defined> </guided-if-store-defined>
Detects if the user is in a store.
3
<guided-if-store gsname="store"> <guided-else-store> </guided-if-store>
Detects if the user is in the store that the gsname parameter specifies.

Zones

Tag
Description
1
<guided-zone gsname="zone area" [search="associated search"] [facet="associated facet"] [width="xx" height="yy"]>
You can wrap any content in zone tags to create a zone out of that area. This lets you use business rules to display the zone as needed. By default, zones are always displayed. You can use the optional search and facet parameters to indicate what search or facet is associated with the zone. Such functionality lets the software skip searches or facets when a zone is hidden, improving search-time performance. The height and width attributes are optional and are used to configure how the placeholder is displayed in the Visual Rule Builder when a zone is removed.
Use the guided-if-facet[-not]-visible tag instead of the zone where possible. It simplifies the presentation template.
2
<guided-if-zone gsname="zone area"> <guided-else-zone> </guided-if-zone>
This set of tags enables testing if a zone is currently being displayed. It is useful when you have content elsewhere on the page that you only want to display when the zone is displayed.

Loop Indicators

You can use each of the following loop indicators in any of these loop blocks:
  • guided-results
  • guided-facet-values
  • guided-breadcrumb
  • guided-menu-items
  • guided-pages
Tag
Description
1
<guided-if[-not]-first><guided-else[-not]-first> </guided-if[-not]-first>
This condition is true when the current iteration is the first iteration of the loop. That does not necessarily mean the first result or the first page, but the first one shown. If the site visitor is on page 2 of a results set that is 10 per page, the first iteration is result 11.
2
<guided-if[-not]-last><guided-else[-not]-last> </guided-if[-not]-last>
This condition is true when the current iteration is the last iteration of the loop. That does not necessarily mean the last result or the last page, but the last one shown in the current context (page). If the site visitor is on page 1 of a results set that contains 200 results but only has 10 results per page, the last iteration is result 10 instead of result 200.
3
<guided-if[-not]-odd><guided-else[-not]-odd> </guided-if[-not]-odd>
This condition is true when the current iteration is an odd iteration of the loop (versus an even iteration). This is helpful for displaying varying row colors.
4
<guided-if[-not]-even><guided-else[-not]-even> </guided-if[-not]-even>
This condition is true when the current iteration is an even iteration of the loop (versus an odd iteration). This is helpful for displaying varying row colors.
5
<guided-if[-not]-alt><guided-else[-not]-alt> </guided-if[-not]-alt>
This condition is true when the current iteration is an even iteration of the loop. This is helpful for displaying varying row colors.
6
<guided-if[-not]-inner><guided-else[-not]-inner> </guided-if[-not]-inner>
Includes the text between them if the current iteration is neither the first or the last.
7
<guided-if[-not]-outer><guided-else[-not]-outer> </guided-if[-not]-outer>
Includes the text between them if the current iteration is the first or the last.
8
<guided-loop-index>
An integer (starting from 0) whose value increments for each iteration of the loop.
9
<guided-loop-counter>
An integer (starting from 1) whose value increments for each iteration of the loop.

Miscellaneous Language

The following tags are available to let you do more advanced things with your template, such as building your own mini-facet.
Tag
Description
1
<guided-current-path [escape="html|url|js|json|0"] />
Gives you the current path that is used. Typically it is used to create a link that adds on a new parameter to the existing search. By default the path is URL escaped. You can specify which mode of escaping you want to use by way of the escape parameter.
Example:
<a href="<guided-current-path />&lang=fr"> French Version
In this example, a search processing rule uses lang to select the French version.
Current path always has at least one query parameter. If no other query parameters exist it is set to q=* making it easier to add more parameters.
2
Base Path
If you want to create a link using the basepath, use / at the start of your href and add on parameters.
<a href="/">All Products</a> Would create a link "All Products" to your basepath, for example https://search.mycompany.com/
3
<guided-query-param gsname="query_parameter" [escape="html|url"] />
Lets you grab the existing value of a query parameter that is on the URL. If your parameter does not exist, this tag returns an empty string. If you do not specify an escape option the string returned is automatically HTML escaped, you can specify either HTML or URL escaping.
Example:
If my URL is https://stage.leejeansken.com:2928/?q=pants&lang=en
  &lt;guided-query-param&nbsp;gsname="q"&nbsp;/&gt; 
      gives&nbsp;you&nbsp;the&nbsp;value&nbsp;pants 
       
      &lt;guided-query-param&nbsp;gsname="lang"&nbsp;/&gt; 
      gives&nbsp;you&nbsp;the&nbsp;value&nbsp;en 
       
      &lt;guided-query-param&nbsp;gsname="test"&nbsp;/&gt; 
      gives&nbsp;you&nbsp;an&nbsp;empty&nbsp;string 
      &nbsp; 
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </code> </p> </td> 

4
<guided-query-param-name gsname="param#" offset="offset_number"/>
Guided Search has the notion of a query number, which is used in the breadcrumb control. guided-query-param-name lets you define parameters as part of a link in the presentation template where Guided Search figures out the correct query number for you. The gsname has an "x" in it, which Guided Search replaces with the correct number. The offset value can be 0 - 15, where 0 indicates that the next available query number is used. A 1 indicates that you want to add 1 to it, and so on.
Combined with guided-current-path , you can build your own mini facet link or allow an additional drill-down level.
Example:
<a href="<guided-current-path         />&<guided-query-param-name gsname="q#" offset="0"         />=mens&<guided-query-param-name gsname="x#" offset="0"         />=category" >Category:Men</a>        
<a href="<guided-current-path         />&<guided-query-param-name gsname="sp_q_exact_#" offset="0"         />=mens&<guided-query-param-name gsname="sp_x_#" offset="0"         />=category&<guided-query-param-name gsname="sp_q_exact_#" offset="1"         />=Jeans&<guided-query-param-name gsname="sp_x_#" offset="1"         />=product-type" >Cat:Men - Product:Jeans</a>
5
<guided-include gsfile="filename" />
Lets you include other template files. This functionality means that you can create multiple templates using sub templates as modules.
In the following example, the breadcrumbs and facets files are included:
<guided-include gsfile='breadcrumbs.tmpl' /> <guided-include gsfile='facets.tmpl' />
Dynamic includes are not supported. In other words, gsfile cannot be a variable.
6
<guided-search-time>
Identifies how long the search took. The returned search time value is specified in ms.
7
<guided-fall-through-searches>
Returns the count of cores searches that are used to build the page of search results.
8
<guided-if-fall-through-search></guided-if-fall-through-search>
Tests if the count of core searches is greater than one.
9
<guided-if[-not]-even><guided-else[-not]-even> </guided-if[-not]-even>
This condition is true when the current iteration is an even iteration of the loop (versus an odd iteration). This is helpful for displaying varying row colors.
10
<guided-if[-not]-alt><guided-else[-not]-alt> </guided-if[-not]-alt>
This condition is true when the current iteration is an even iteration of the loop. This is helpful for displaying varying row colors.
11
<guided-if[-not]-inner><guided-else[-not]-inner> </guided-if[-not]-inner>
Includes the text between them if the current iteration is neither the first or the last.
12
<guided-if[-not]-outer><guided-else[-not]-outer> </guided-if[-not]-outer>
Includes the text between them if the current iteration is the first or the last.
13
<guided-if-first-search><guided-else-first-search> </guided-if-first-search>
Lets you check whether you are on the initial search or not (query was the result of a search from the search box).
14
<guided-search-url/>
You can use this tag in your template to save you from hardcoding the search form's action. It detects when you are in the Staged or Live environment and changes correspondingly.
15
<guided-if-query-param-defined gsname="query_parameter"> <guided-else-query-param-defined> </guided-if-query-param-defined>
This set of tags lets you test what CGI parameters are defined in the search path. You can test the values of the parameters only if they are defined.
16
<guided-next-query-number [gsname="offset"] />
The Guided Search engine that drives the template has the notion of floating query numbers where each new link that the engine generates, uses the next available query number. This tag lets you grab the next query number or offsets so that you can build custom links that drill into the result set. Offset lets you offset into the next query number. For example, if you have selected one facet, the next query number is 2, with an offset of 1 the query number returned is 3.
17
<guided-custom-var gsname="custom_variable" [escape="html|url|js|json|0"]/>
Lets you grab the existing value of a custom variable that your processing rules define. If you do not specify an escape option the string returned is automatically HTML escaped, you can specify either html , url , js , or 0 . If you use a processing rule to copy an incoming CGI parameter to a custom variable and then display or use that variable in your template with escaping set to none or js, then you can create an XSS vulnerability in your search.
18
<guided-if-custom-var-defined gsname="custom_variable"> <guided-else-custom-var-defined> </guided-if-custom-var-defined>
Enables testing if a custom variable is defined in the processing rules (query cleaning, pre-search processing and post-search processing).
19
<guided-general-field gsname="searchname" field="fieldname" [escape="html|url|js|json|0"]/>
Lets you display the contents of a general field that is defined in the transport template. If you do not specify an escape option the string returned is encoded in the format you have specified in the transport template for that field. Specifying an escape option applies on top of whatever format you are encoding the field as in your transport template. You can specify either html , url , js , json , or 0 .
20
<guided-if-general-field gsname="searchname" field="fieldname"> <guided-else-general-field> </guided-if-general-field>
Enables testing if the contents of a general field, as defined in the transport template, exists.
21
<guided-cookie-value gsname="cookie_name" [escape="html|url|js|json|0"]/>
Lets you grab the value of a cookie, assuming that the cookie is available. If you do not specify an escape option the string returned is automatically HTML escaped, you can specify either html , url , js , json , or 0 .
22
<guided-if-cookie gsname="cookie_name"> <guided-else-cookie> </guided-if-cookie>
Enables testing if a cookie exists.
23
<guided-banner gsname="banner area" [escape="html|url|js|json|0"] [width="xx" height="yy"]/>
Outputs the banner for a given area. The optional width and height attributes are used in the Visual Rule Builder to enable the display of a meaningful place-holder to let users select a banner. By default banners are not escaped. Instead, you want to inject HTML into the presentation template. However, if you are building a JSON template consider using the js escaping option.
Example:
<guided-banner gsname="top" width="400px"  height="50px"/>
24
<guided-if-banner-set gsname="banner area"> <guided-else-banner-set> </guided-if-banner-set>
Enables testing if a banner area is set.
25
<guided-if-simulator-mode> <guided-else-simulator-mode> </guided-if-simulator-mode>
Lets you detect when you are viewing your search in Simulator or the Visual Rule Builder. It is normally used to display extra debug information for you.
26
<guided-if-tnt-business-rules> <guided-else-tnt-business-rules> </guided-if-tnt-business-rules>
Lets you detect if you have any business rules referencing an Adobe Target campaign. It is normally used as part of the integration with Adobe Target to prevent hitting the Target servers when it is not necessary.
27
<guided-redirect/>
By default redirects are performed automatically. However, if you have configured site search/merchandising to return an XML or JSON response to your web-application, you can choose to either parse the 302/301 response in your web-application or have the redirect passed to you as part of the result set. If you are passing the redirect as part of the result set, then this tag can be used in the template to output the redirect location.
28
<guided-if-redirect> <guided-else-redirect> </guided-if-redirect>
When you have configured site search/merchandising to return redirects in the result set, this set of tags can be used to determine if there is a redirect to output.
29
<guided-lt/> <guided-gt/>
This set of tags lets you embed guided template tags within HTML attributes.
Example:
<guided-lt/>div <guided-if-facet-long>         style="height: 125px; overflow:         auto;"</guided-if-facet-long><guided-gt/>

Transport template tags

Transport templates are XML templates that pass data from the backend search to the Guided Search presentation layer.
In your presentation layer, you can have a single presentation template that presents the results of multiple searches. Each search could use the same transport template or a custom transport template to pass the data to the presentation layer.
Because the transport template is only used to pass data to the presentation layer, it does not have any HTML that is concerned with displaying the search results. The transport template uses transport template XML tags to pass the search results for populating the Guided Search components, such as facets, breadcrumbs, and menus. Within these tags standard search template tags are used to display the actual values.
Transport template tag
Description
<guided-xml></guided-xml>
The root XML tags that the presentation layer uses to detect what gets parsed out of the transport template.
<general></general>
Tags surround search template tags that provide summary data based on the result set. Typically, these tags contain search tags for total number of results, lower result, and highest result. You can define any number of additional global fields that you want with the general-field tag, as in the following example:
<general>   <total><search-total /></total>   <lower><search-lower /></lower>   <upper><search-upper /></upper>   <general-field name="my_custom_field">Some global content</general-field> </general>
<results></results>
Tags are wrapped around the search results, so that Guided Search knows where to look for them.
<result></result>
Tags are wrapped around each search result, so that Guided Search recognizes where the content for a single search result starts and ends, as in the following example:
<results>   <search-results>     <result>       <index><search-index /></index>       <loc><search-cdata><search-url length="500" /></search-cdata></loc>     </result>   </search-results> </results>
<attribute-table name="tablename">
Lets you loop through each item in a multi-value list for a single result. Only use this tag within a result. Its purpose is to let you iterate over attributes that belong to a result field, as in the following example:
<results>   <search-results>     <result>       <index><search-index /></index>       <loc><search-url /></loc>       <title><search-title /></title>       <attribute-table name="downloads">         <field name="download_title"><search-display-field name="download_title" /></field>         <field name="download_link" delimiter="|"><search-display-field name="download_link" /></field>       </attribute-table>     </result>   </search-results> </results>
<facets></facets>
Passes on the results that populate the facets.
<dynamic-facet></dynamic-facet>
You can designate a facet as both a dynamic facet and as a member of a facet rail. However, their treatment is independent with respect to the related presentation template tags.
In other words, the nesting of a facet rail looping context within a dynamic facet looping context, or vice versa, is not allowed.
For facets that are both dynamic and railed, only those dynamic facets that were returned for a given search are visible within the facet rail looping context.
<facet name="name"></facet>
Each facet has its own facet tags where the name parameter matches the facet name. Search tags are used within the facet tags for the facet values, as in the following example:
<facets>   <facet name="brand">     <values><search-field-value-list name="brand" quotes="no" commas="yes" data="values" sortby="values" /></values>     <counts><search-field-value-list name="brand" quotes="no" commas="yes" data="counts" sortby="values" /></counts>   </facet>   <facet name="category">     <values><search-field-value-list name="category" quotes="no" commas="yes" data="values" sortby="values" /></values>     <counts><search-field-value-list name="category" quotes="no" commas="yes" data="counts" sortby="values" /></counts>   </facet> </facets>
Accounts using slotted facets can use the dynamic tag and the display-names tag. Both of these tags help facilitate the mapping between slotted facets and real facets while creating business rules.
<facets>   <facet name="facet_values01">  <dynamic>1</dynamic>  <display-names><search-field-value-list name="facet_names01" quotes="no" commas="yes" data="values" sortby="values" /></display-names>     <values><search-field-value-list name="facet_values01" quotes="no" commas="yes" data="values" sortby="values" /></values>     <counts><search-field-value-list name="facet_values01" quotes="no" commas="yes" data="counts" sortby="values" /></counts>   </facet>
<search-display-field separator=",">
The separator attribute lets change the delimiter that is used when you output search-display-field data for lists. The default is a comma.
Generally, the delimiter you use should be something that does not readily appear in your field content.
<suggestions></suggestions>
Wrap your Did You Mean suggestions with tags so that Guided Search recognizes which XML nodes contain suggestions.
<suggestion></suggestion>
Wrap each Did You Mean suggestion with tags, as in the following example:
<search-if-suggestions>   <suggestions>     <search-suggestions>       <suggestion><search-suggestion-text /></suggestion>     </search-suggestions>   </suggestions> </search-if-suggestions>

Search template tags

A search template is an HTML file that includes template tags that site search/merchandising defines. These tags indicate how your search results are formatted. The following reference contains a brief description of each search template tag and its attributes.
Only use search template tags in transport template files (.tpl).
You can select from the following search template tag groups and reference material.
Tags that are valid only within the results loop include the following:
Tags that are valid throughout the template include the following:
Search template reference topics

About Results loop tags

The results loop tag is the workhorse of the template system. When the tag is encountered during a search, the HTML is repeated and other tags between the beginning and ending results loop tags, replacing any other tags with your search results.
<search-results> ... </search-results>
The results loop tags surround the HTML that shows the search results. The HTML between the tags is repeated for every result and is displayed on the page.
The following tags are valid only within the results loop:

Results loop string tags

The following tags return a string.
Tag
Description
1
<search-index>
Returns the numerical index of the current result.
2
<search-title length="XX">
Returns the page title of the current result. The optional length attribute is used to limit the length of strings displayed, with a default of 80 characters.
3
<search-bodytext length="XX" encoding="html/javascript/json/perl/url/none" >
Returns the body text starting from the top of the page. Relevant terms are shown in bold. The optional length attribute is used to limit the length of strings displayed, with a default of 80 characters. The encoding attribute is optional and it can encode output characters with HTML encoding (default), Javascript encoding, Perl encoding, or none.
4
<search-description length="XX" encoding="html/javascript/json/perl/url/none">
Returns the description of the current result. If the meta description tag exists and the content attribute is not empty, that text is shown. Otherwise, the beginning of the body text of the page is shown. The optional length attribute is used to limit the length of strings displayed, with a default of 80 characters.
The optional encoding attribute controls whether the output is HTML encoded, JavaScript encoded, Perl encoded, URL encoded or not encoded, for output on the results page. The default value of encoding is html . Normally, you do not need to specify the encoding attribute.
5
<search-score rank="dynamic/static/dynamic-raw/static-raw/final-raw" precision="XX">
Returns the score of the current result, which is a number 0 - 100. If you have defined a rank field under Options > Metadata > Definitions , you can display the dynamic page rank by setting the rank attribute to dynamic ( <search-score rank="dynamic"> ). You can display the static page rank by setting the rank attribute to static ( <search-score rank="static"> ). You can use the optional precision attribute to specify the number of decimal places to display. The default is 0 which displays the integer score).
6
<search-date length="XX" none="text" date-format="date-format-string" gmt="yes/no" language="0/2/language-id">
Returns the date of the current result. The optional "none" text value is displayed if there is no date associated with the current result. If the optional "none" value is not given, the text "No Date" is displayed if there is no date associated with the current result.
The "date-format" attribute takes a UNIX style date format string such as "%A, %B %d, %Y" (for "Monday, July 25, 2016"). "gmt" defaults to "yes" and controls whether the time portion of the date string should be output in GMT ("yes") or the account's time zone ("no").
The "language" attribute controls the language and locale conventions of the output date string. "0" (the default) means "Use Account Language". "2" means "Use Document Language". The "language" value "1" is reserved for future use. Any other "language" value is interpreted as a specific language identifier, for example, "en_US" means "English (United States)".
The optional length attribute is used to limit the length of strings displayed, with a default of 80 characters.
7
<search-size>
Returns the size of the current result in bytes.
8
<search-url length="XX" encoding="html/javascript/json/perl/url/none" >
Returns the URL of the current result.
Use the optional length attribute to limit the length of strings displayed, with a default of unlimited characters.
The encoding attribute is optional and it can encode output characters with HTML encoding, Javascript encoding, Perl encoding, or none.
9
<search-url-path-query length="XX">
Returns the path and query portions including the question mark of the URL of the current result.
Use the optional length attribute to limit the length of strings displayed, with a default of unlimited characters.
10
<search-context length="XX" encoding="html/javascript/json/perl/url/none" >
Returns the next line of context for the search term. Relevant terms are shown in bold. Call this tag repeatedly to display more than one context line for the current result.
Use the optional length attribute to limit the length of strings displayed, with a default of 80 characters. The length attribute is ignored if this tag is enclosed by either <search-if-context> or <search-if-any-context> tag sets which contain a length attribute.
The encoding attribute is optional and it can encode output characters with HTML encoding (default), Javascript encoding, Perl encoding, or none.
11
<search-display-field name="field-name" length="XX" none="text" date-format="date-format-string" gmt="yes/no" language="0/2/language-id" encoding="html/javascript/json/perl/url/none" quotes="yes/no" commas="yes/no" units="miles/kilometers" separator="|">
This advanced tag displays the content of the metadata field (url, title, desc, keys, target, body, alt, date, charset, and language or fields defined under Options > Metadata > Definitions) specified in the name attribute, for the current result. For example:
<search-display-field name="title" length="70" none="no title">
Outputs the title of the page for a search result. If the optional none attribute is specified, its value is displayed on the results page only if there is no content associated with the field.
The date-format , gmt and language attributes are only relevant if the content type of the specified field is date .
The date-format attribute takes a UNIX style date format string such as %A, %B %d, %Y (for Monday, July 25, 2016). gmt defaults to yes and controls whether the time portion of the date string is output in GMT ( yes ) or the account's time zone ( no ).
The language attribute controls the language and locale conventions of the output date string. 0 (the default) means "Use Account Language". 2 means "Use Document Language". The language value 1 is reserved for future use). Any other language value is interpreted as a specific language identifier, for example, en_US means "English (United States)".
The optional length attribute is used to limit the length of strings displayed, with a default of 80 characters.
The optional encoding attribute controls whether the output is HTML encoded, JavaScript encoded, Perl encoded, URL encoded or not encoded, for output on the results page. The default value of encoding is html . Normally, you do not need to specify the encoding attribute.
The optional quotes attribute controls whether the individual items output are surrounded by double-quotes (or single-quotes, if encoding=perl ). The default value of quotes is no .
The optional commas attribute controls whether the individual items output are separated by commas. The default value of commas is yes . The commas attribute is ignored for non-list-type fields.
The optional units attribute controls the distance units applied to a proximity search output field. The default value of units is determined from the "Default Units" setting of the location-type field associated with the given proximity search output field.
The optional separator attribute defines the single character, or delimiter, that is inserted between the values of the output for list-type fields.
12
<search-display-field-values name="field-name"> ...<search-display-field-values>
This tag creates a loop for enumerating metadata field values (url, title, desc, keys, target, body, alt, date, charset, and language or fields defined under Options > Metadata > Definitions ) for the current result. Do not nest this tag inside another <search-display-field-values> tag. The name attribute specifies the name of the field containing the values to enumerate. This tag is most useful with fields that have the Allow Lists attribute checked (under Options > Metadata > Definitions ).
13
<search-display-field-value date-format="date-format-string" gmt="yes/no" language="0/language-id" encoding="html/javascript/json/perl/url/none">
This tag outputs the metadata field value (url, title, desc, keys, target, body, alt, date, charset, and language or fields defined under Options > Metadata > Definitions ) for the current <search-display-field-values> loop iteration. This tag is only valid inside a <search-display-field-values> loop. The date-format , gmt and language attributes are only relevant if the content type of the field name specified in the enclosing <search-display-field-values> tag is date . The date-format attribute takes a UNIX style date format string such as "%A , %B %d , %Y " (for "Monday, July 25, 2016"). The gmt attribute defaults to yes and controls whether the time portion of the date string is output in GMT ( yes ) or the account's time zone ( no ).
The language attribute controls the language and locale conventions of the output date string. 0 (the default) means "Use Account Language". Any other language value is interpreted as a specific language identifier, for example, en_US means "English (United States)".
The optional encoding attribute controls whether the output is HTML encoded, JavaScript encoded, Perl encoded, URL encoded or not encoded, for output on the results page. The default value of encoding is html . Normally, you do not need to specify the encoding attribute.
14
<search-display-field-value-count name="field-name">
Outputs the total number of values in the current result for the metadata field (url, title, desc, keys, target, body, alt, date, charset, and language or fields defined under Options > Metadata > Definitions ) specified with the name attribute. This tag can appear anywhere in the results loop.
15
<search-display-field-value-counter>
Outputs the ordinal counter (1, 2, 3, and so on) for the current <search-display-field-values> loop iteration. This tag is only valid inside a <search-display-field-values> loop.
16
<search-dynamic-facet-fields>
Begins a looping context for any dynamic-facet-fields returned for this search.
17
<search-dynamic-facet-field-name>
Outputs the name of the current dynamic-facet-field, for this loop iteration.
18
<search-result-trace encoding="html/javascript/ json/perl/url/none">
Outputs information related to the placement of the current result, for example, any results-based actions that affected the position of the result.
The output format of this tag is JSON as in the following example:
{   "sliceID": 5,   "indexID": 5894,   "finalScore": 98.5,   "dynamicScore": 15.3,   "staticScore": 55.456,   "position": 1,   "rbtaActionListID": 117,   "rbtaActionID": 57 }
The encoding attribute is optional; the default value is html .
Note: This tag only has output if sp_trace=1 is specified with the core search query parameters.
See row 48 in the table found in Backend search CGI parameters .

Results loop conditional tags

The following tags conditionally include the HTML between them.
Tag
Description
1
<search-if-title> ... </search-if-title>
<search-if-not-title> ... </search-if-not-title>
These tags include the HTML between them if the next call to <search-title> returns (or does not return) text from the document title.
2
<search-if-description length="XX"> ... /search-if-description>
<search-if-not-description> ... </search-if-not-description>
These tags include the HTML between them if the next call to <search-description> returns (or does not return) text from the document description.
3
<search-if-bodytext> ... </search-if-bodytext>
<search-if-not-bodytext> ... </search-if-not-bodytext>
These tags include the HTML between them if the next call to <search-bodytext> returns (or does not return) text from the document body.
4
<search-if-context length="XX"> ... </search-if-context>
<search-if-not-context> ... </search-if-not-context>
These tags include the HTML between them if the next call to <search-context> returns (or does not return) a non-empty context string. The length attribute overrides the length attribute on any enclosed <search-context> tag.
5
<search-if-any-context length="XX"> ... /search-if-any-context>
<search-if-not-any-context> ... </search-if-not-any-context>
These tags include the HTML between them if there is (or is not) a context string associated with the result. The length attribute overrides the length attribute on any enclosed <search-context> tag.
6
<search-if-score lower="XX" upper="yy" rank="dynamic/static/dynamic-raw/static-raw/final-raw"> ... </search-if-score>
<search-if-not-score lower=XX upper=yy rank="dynamic/static"> ... </search-if-not-score>
These tags include the HTML between them if the score of the current result is (or is not) between XX and YY. Useful for adding bullets or graphics to show how relevant the result is. If you have defined a rank-type field under Options > Metadata > Definitions , you can check the dynamic page rank by setting the rank attribute to dynamic ( <search-if-score rank="dynamic" lower=XX upper=YY> ). You can check the static page rank by setting the rank attribute to static ( <search-if-score rank="static" lower=XX upper=YY> ).
7
<search-if-field name="field-name" value="value"> ... </search-if-field>
<search-if-not-field name="field-name" value="value"> ... </search-if-not-field>
These advanced tags include the HTML between them based on whether the field specified in the "name" attribute has content or not. If the optional "value" attribute is specified, the tags include the HTML between them based on whether the given value matches (or does not match) the value for the field in the current result. These tags only function within the results loop (between <search-results> and </search-results> tags).

Results loop anchor link tags

Tag
Description
1
<search-link target="frame-name" hbx-enable="yes/no" hbx-linkid-name="field-name" hbx-linkid-none="text" hbx-linkid-length="XX" > ... </search-link>
This pair of tags creates an anchor link around the HTML between them. When the link is clicked, the results page displays. An optional target attribute specifies the named window in which frame-capable browsers should display the results page.
Set the hbx-enable attribute to "yes" to take advantage of the analytics available through HBX. Set hbx-linkid-name to the name of a Meta-data field you would like to track. For example, to track search results by SKU number, set hbx-linkid-name to the name of the Meta-data field that contains SKU information.
Date-type fields are currently not supported. The value of hbx-linkid-name is appended to the link ID in the generated anchor. The value of the hbx-linkid-none attribute is appended to the link ID whenever the named Meta-data field is empty. The value of hbx-linkid-length limits the number of characters fetched and displayed from the Meta tag. The default number of characters is 12.
2
<search-smart-link target="frame-name" hbx-enable="yes/no" hbx-linkid-name="field-name" hbx-linkid-none="text" hbx-linkid-length="XX"> ... </search-smart-link>
This pair of tags is similar to the <search-link> ... </search-link> tags. When the generated anchor links are clicked, the results page displays, but with the page scrolled to the nearest anchor tag preceding the result. For PDF links, the Acrobat viewer displays the page that contains the result. An optional target attribute specifies the named window in which frame-capable browsers should display the results page.
Set the hbx-enable attribute to "yes" to take advantage of the analytics available through HBX. Set hbx-linkid-name to the name of a Meta-data field you would like to track. For example, to track search results by SKU number, set hbx-linkid-name to the name of the Meta-data field that contains SKU information.
Date-type fields are currently not supported. The value of hbx-linkid-name is appended to the link ID in the generated anchor. The value of the hbx-linkid-none attribute is appended to the link ID whenever the named Meta-data field is empty. The value of hbx-linkid-length limits the number of characters fetched and displayed from the Meta tag. The default number of characters is 12.
3
<search-if-link-extension> ... </search-if-link-extension>
<search-if-not-link-extension> ... </search-if-not-link-extension>
These tags include the HTML between them if a value attribute specifies an extension that matches the end of the URL for the result. This tag is useful for including a graphic in the search results based on the link extension. The value attribute is a list of one or more extensions (space separated) as follows: VALUE=".pdf" or VALUE=".html .htm".

Loop position conditional tags

The following tags conditionally include the text between them. They can only appear inside the "looping" tags: < search-results> and <search-field-values> . They are used to test the position of the current result within the result set.
Tag
Description
1
<search-if-first> ... </search-if-first>
<search-if-not-first> ... </search-if-not-first>
These tags include the text between them if the current result is (or is not) the first result on the page (when used inside <search-results> ) or the first field value (when used inside <search-field-values> ).
2
<search-if-last> ... </search-if-last>
<search-if-not-last> ... </search-if-not-last>
These tags include the text between them if the current result is (or is not) the last result on the page (when used inside <search-results> ) or the last field value (when used inside <search-field-values> ). This tag can be used to insert a separator between results. For example, this inserts an <hr> tag between results:
<search-results>    <search-lt>tr<search-if-alt> class="alt"</search-if-alt><search-gt>       <td><search-url></td>    </tr> </search-results>
3
<search-if-inner> ... </search-if-inner>
<search-if-not-inner> ... </search-if-not-inner>
These tags include the text between them if the current result is not the first nor the last result on the page (when used inside <search-results> ) or is not the first nor the last field value (when used inside <search-field-values> ). The not version of the tag tests whether the result is either the first or the last.
4
<search-if-alt> ... </search-if-alt>
<search-if-not-alt> ... </search-if-not-alt>
These tags include the text between them if the current result is (or is not) an alternate result on the page (when used inside <search-results> ) or an alternate field value (when used inside <search-field-values> ). The "alternate" results are the second, fourth, sixth, and so on, on the page. This example applies a different class to alternate table rows. Note the use of <search-lt> and <search-gt> to allow the <search-if-alt> tag to be placed "inside" the <tr> tag.
    <search-results>        <search-lt>tr<search-if-alt> class="alt"</search-if-alt><search-gt>           <td><search-url></td>        </tr>     </search-results>
5
<search-if-even> ... </search-if-even>
<search-if-not-even> ... </search-if-not-even>
These tags include the text between them if the current result is (or is not) an even-numbered result (when used inside <search-results> ) or an even-numbered field value (when used inside <search-field-values> ). A search result is even-numbered if its <search-index> value is even. In other words, if its position within the entire result set is even. This may be different from <search-if-alt> which tests the position of a result on the page, not within the entire result set. The following two tables illustrate the difference:

First page, sp_n=1

Index
Result
Even?
Alt?
1
First result
No
No
2
Second result
Yes
Yes
3
Third result
No
No
4
Fourth result
Yes
Yes
5
Fifth result
No
No

Later page, sp_n=10

Index
Result
Even?
Alt?
10
Tenth result
Yes
No
11
Eleventh result
No
Yes
12
Twelfth result
Yes
No
13
Thirteenth result
No
Yes
14
Fourteenth result
Yes
No
Finally, note that <search-if-even> is always the same as <search-if-alt> for search field values since field values are not paged.

Field value list tags

The following advanced tags output field values and related data from the entire set of search results. These tags only yield output for fields specified by the sp-sfvl-field CGI parameters in the search query.
Tag
Description
1
<search-field-value-list name="field-name" quotes="yes/no" commas="yes/no" data="values/counts/results" separator="X" sortby="none/values/counts/results" max-items="XX" date-format="date-format-string" gmt="yes/no" language="0/language-id" encoding="html/javascript/json/perl/url/none">
This tag displays a list of unique field values, value counts, or result counts within the entire result set.
This tag only yields output for fields specified by the sp_sfvl_field CGI parameters in the search query. The optional "quotes" attribute controls whether the individual items output are surrounded by double-quotes (or single-quotes, if encoding=perl). The default value of "quotes" is "yes". The optional "commas" attribute controls whether the individual items output are separated by commas. The default value of "commas" is "yes". The optional "data" attribute controls whether each unique field value is output (data="values"), the total count of each unique field value is output (data="counts"), or the number of results containing each unique value (data="results") is output. The default value of "data" is "values". For non-list-type fields, data="counts" and data="results" are equivalent. The separator attribute defines the single character, or delimiter, to be inserted between the values of the output. The optional "sortby" attribute controls the ordering of the output; sortby="none" means no particular order, sortby="values" means sort by field values (in ascending or descending order according to the field's Sorting property), sortby="counts" means sort in descending order of field value counts, and sortby="results" means sort in descending order of the number of results containing each value.
Note that sortby="counts" and sortby="results" are equivalent for non-list-type fields. The optional "max-items" attribute limits the number of items to output. The default value of "max-items" is -1, which means "output all items".
There is an absolute limit of 100 for max-items. The "date-format", "gmt" and "language" attributes are only relevant if the content type of the specified field is "date". The "date-format" attribute takes a UNIX style date format string such as "%A, %B %d, %Y" (for "Monday, July 25, 2016"). "gmt" defaults to "yes" and controls whether the time portion of the date string should be output in GMT ("yes") or the account's time zone ("no").
The "language" attribute controls the language and locale conventions of the output date string. "0" (the default) means "Use Account Language". Any other "language" value is interpreted as a specific language identifier, for example, "en_US" means "English (United States)". The optional "encoding" attribute controls whether the output string characters are HTML encoded, JavaScript encoded, Perl encoded, URL encoded or not encoded, for output on the results page. The default value of "encoding" is "html".
2
<search-field-value-list-count name="field-name" value="field-value" results="yes/no">
This tag displays count information for a given search-field-value-list. There are three distinct uses for this tag. If only the "name" attribute is supplied, this tag outputs the number of unique values for the named field within the entire results set. If the "name" and "value" attributes are both supplied, this tag outputs either the total count of the given value within the entire results set (for results="no"), or the total count of results containing the given value in the entire results set (for results="yes"). The default value of "results" is "no". Note: For non-list-type fields, results="yes" and results="no" are equivalent. The value of "results" is ignored if the "value" attribute is not supplied. This tag only yields output for fields specified by the sp-sfvl-field CGI parameters in the search query.
3
<search-if-field-value-list-count name="field-name" value="field-value"> ... </search-if-field-value-list-count>
<search-if-not-field-value-list-count name="field-name" value="field-value"> ... </search-if-not-field-value-list-count>
These tags display the HTML between them if the equivalent call to <search-field-value-list-count name="field-name" value="field-value"> with the given attributes would (or would not) return a value greater than zero.
4
<search-if-single-field-value-list-count name="field-name"> ... </search-if-single-field-value-list-count>
These tags display the content between them if the equivalent call to <search-field-value-list-count name="field-name" value="field-value"> with the given attributes would (or would not) return a single value. This is typically used when an account is using facets slots. With facet slots, you typically only want to display the value-slot when the associated name-slot has a single item. Doing this check in the transport template is more efficient than doing it in the presentation layer.

Field value list loop tags

The following advanced tags enumerate and output field values and related data from the entire set of search results using a looping construct. These tags only yield output for fields specified by the sp-sfvl-field CGI parameters in the search query.
Tag
Description
1
<search-field-values name="field-name" sortby="none/values/counts/results" max-items="XX"> ... </search-field-values>
This tag creates a loop for enumerating field values and related data for a particular field within the entire results set. Do not nest this tag inside another <search-field-values> tag. The "name" attribute specifies the name of the field containing the values to enumerate. The optional "sortby" attribute controls the enumeration order: "none" means no particular order, "values" means sort by field values (in ascending or descending order according to the field's Sorting property), sortby="counts" means sort in descending order of field value counts, and sortby="results" means sort in descending order of the number of results containing each value.
Note that sortby="counts" and sortby="results" are equivalent for non-list-type fields. . The optional "max-items" attribute limits the number of iterations to the given value. The default value for "max-items" is -1, which means "enumerate all values".
2
<search-field-value date-format="date-format-string" encoding="html/javascript/json/perl/url/none" gmt="yes/no" language="0/language-id">
This tag outputs the field value for the current <search-field-values> loop iteration. This tag is only valid inside a <search-field-values> loop. The "date-format", "gmt" and "language" attributes are only relevant if the content type of the field name specified in the enclosing <search-field-values> tag is "date". The "date-format" attribute takes a UNIX style date format string such as "%A, %B %d, %Y" (for "Monday, July 25, 2020").
The optional "encoding" attribute controls whether the output string characters are HTML encoded, JavaScript encoded, Perl encoded, URL encoded or not encoded, for output on the results page. The default value of "encoding" is "none". Normally, you do not need to specify the encoding attribute. "gmt" defaults to "yes" and controls whether the time portion of the date string should be output in GMT ("yes") or the account's time zone ("no"). The "language" attribute controls the language and locale conventions of the output date string. "0" (the default) means "Use Account Language". Any other "language" value is interpreted as a specific language identifier, for example, "en_US" means "English (United States)".
3
<search-field-value-count results="yes/no">
This tag outputs the count associated with the current <search-field-values> loop iteration. The output count is either the number of results in the entire results set containing the field value (results="yes"), or the total count for the field value in the entire results set. The default value of "results" is "no".
For non-list-type fields, results="yes" and results="no" are equivalent. This tag is only valid inside a <search-field-values> loop.
4
<search-field-value-counter>
This tag outputs the ordinal counter for the current <search-field-values> loop iteration. This tag is only valid inside a <search-field-values> loop.

Suggest tags

Suggest provides a user-friendly "Did you mean?" service for suggesting alternative search terms. If a user has misspelled a search term, for example, Suggest can help the user find results by suggesting a correct spelling. The system can also suggest related keywords that can help a user discover results. When generating suggestions, the Suggest service uses two dictionaries: one based on the account language (set under Indexing > Words and Languages > Language ), and the other that is uniquely built from the keywords in the account index.
The Suggest service does not work for Chinese, Japanese, or Korean.
Tag
Description
1
<search-if-suggestions> ... </search-if-suggestions>
Surround these tags with any "Suggest" template tags, such as <search-suggestion> , <search-suggestion-link> , and so on. If the search generates suggestions, the search engine outputs and processes everything between the open and close tag. If the search does not generate suggestions, none of the nested content is output.
2
<search-suggestions> ... </search-suggestions>
This tag generates the "Suggest" loop, which contains a list of suggested search terms (for example, "intend", "intended" and "intends", for a query originally entered as "intendds"). When generating the list of terms, the search engine repeats any nested HTML and/or template tags up to five times, which is the maximum number of suggestions. Use the count attribute to specify the number of generated suggestions (between 0-5).
The <search-suggestions> tag can appear multiple times on the page to repeat the list of suggestions. Multiple suggestions are sorted according to the number of results each yields.
Nest the <search-suggestions> tag between open and close <search-if-suggestions> tags.
3
<search-suggestion-link> ... </search-suggestion-link>
This tag generates a link to the original search query using the selected suggested search term instead of the original term. The tag accepts and simply prints out any HTML attribute such as class, target, and style. The tag can also accept a URL attribute, the value of which is used as the base URL for the generated link. The tags can only appear inside the <search-suggestions> loop.
4
<search-suggestion-text/>
This tag prints out the currently suggested query term (for example, "intend" for a query originally entered as "intendds"). The tag has no attributes and can only appear inside the <search-suggestions> loop.
5
<search-if-not-suggestions> ... </search-if-not-suggestions>
If the search generates no suggestions, the search engine outputs and processes everything between the open and close tag. If the search generates suggestions, none of the nested content is output.
6
<search-if[-not]-first-suggestion> ... </search-if[-not]-first-suggestion>
These conditional tags include the HTML between them based on whether the suggested term is the first term in the Suggest loop. The tags must appear between open and close <search-suggestion> tags.
7
<search-if[-not]-last-suggestion> ... </search-if[-not]-last-suggestion>
These conditional tags include the HTML between them based on whether the suggested term is the last term in the Suggest loop. The tags must appear between open and close <search-suggestion> tags.
8
<search-suggestion-index>
This tag returns the numerical index of the current suggested search term. The tag must appear between open and close <search-suggestion> tags.
9
<search-suggestion-total>
This tag returns the total number of generated suggested search terms. The tag must appear between open and close <search-suggestion> tags.
10
<search-suggestion-result-count>
This tag returns the total number of results for suggested search term. The tag must appear between open and close <search-suggestion> tags.

Template string tags

The following tags output a string into the HTML at that point in the template.
Tag
Description
1
<search-body>
The HTML body tag with any Search Link Color settings that the Basic Look Section sets under the Template link. Add a background attribute to this tag to display background images on the results page. Any color attributes added to this tag override the Search Link Color settings that the Basic Look section sets.
2
<search-header>
The HTML for the Search Results Header as set in the Basic Look section under the Template link.
3
<search-cdata> ... </search-cdata>
The search-cdata tags are replaced with their XML equivalents: <search-cdata> is replaced with <![CDATA[" and the </search-cdata> tag is replaced with " ]]> ". An XML parser does not parse any information between the open and close tag.
4
<search-query query-number="XX" encoding="html/javascript/json/perl/url/none">
The query that the visitor entered. The advanced, optional "query-number" attribute controls which numbered query string is output by this tag. For example, <search-query query-number=1> outputs the contents of the sp_q_1 cgi parameter. If "query-number" is not specified, or if query-number is "0", the main query ( sp_q ) is output. The optional "encoding" attribute controls whether the output is HTML encoded, JavaScript encoded, Perl encoded, URL encoded or not encoded, for output on the results page. The default value of "encoding" is "html". Normally, you do not need to specify the encoding attribute.
5
<search-total>
The total count of results for this search.
6
<search-count>
The count of results reported for this page.
7
<search-lower>
The number of the first result reported for this page.
8
<search-upper>
The number of the last result reported for this page.
9
<search-prev-count>
The number of results reported for the previous page.
10
<search-next-count>
The number of results reported for the next page.
11
<search-time>
The time in seconds for this search.
12
<search-logo>
The HTML for the Search logo that is configured for your account, if any. This logo is the image that gives credit to site search/merchandising
Most accounts do not have an associated Search logo at this time.
13
<search-collection all="name">
The collection of the results for this search. The optional "all" attribute is used to give the name of the collection that represents the entire website.
14
<search-form> ...</search-form>
Inserts begin and end form tags. Inserts the method and action attributes into the begin form tag. Accepts additional attributes including the dir="RTL" attribute for language as well as JavaScript-related "name" and "onSubmit" attributes.
15
<search-input-account>
Inserts a form input tag which specifies your account number.
16
<search-input-gallery>
Inserts a form input tag which specifies the gallery number.
17
<search-input-query query-number="XX">
Inserts a form input tag which specifies the query string. The advanced, optional "query-number" attribute controls which numbered query is used for the form input tag. For example, <search-input-query query-number=1> outputs a form input tag for the sp_q_1 query. If "query-number" is not specified, or if "query-number" is "0", an input tag for the main sp_q query is inserted.
18
<search-input-collections all="name">
Inserts a form select tag and associated HTML which display the collections selection menu. The optional "all" attribute is used to give the name of the collection that represents the entire website.
19
<search-lt>
Inserts the output from one of the Search template tags within other HTML or template tags on the results page. <search-lt> inserts a less than character. Use of <search-lt> and <search-gt> provides a way to escape the definition of a tag so that you can use Search template tags as attribute values. When the template is rendered in response to a search, a less-than sign (<) replaces the <search-lt> tag. For example, <search-link> is equivalent to <search-lt>a href="<search-url>"<search-gt> .
20
<search-gt>
Inserts the output from one of the Search template tags within other HTML or template tags on the results page. <search-gt> inserts a greater than character. Use of <search-lt> and <search-gt> provides a way to escape the definition of a tag so that you can use other template tags as attribute values. When the template is rendered in response to a search, a greater-than sign (>) replaces the <search-gt> tag. For example, <search-link> is equivalent to <search-lt>a href="<search-url>"<search-gt> .
21
<search-param name="param-name" length="XX" encoding="html/javascript/json/perl/url/none">
Returns the value of the cgi parameter named "param-name" from the current search request. The optional "encoding" attribute controls whether the output is HTML encoded, JavaScript encoded, Perl encoded, URL encoded or not encoded, for output on the results page. The default value of "encoding" is "html". Normally, you do not need to specify the encoding attribute.
22
<search-trace encoding="html/javascript/ json/perl/url/none">
The encoding attribute is optional; the default value is json .
Note: This tag only has output if sp_trace=1 is specified with the core search query parameters.
See row 48 in the table found in Backend search CGI parameters .

Template anchor link tags

The following are tags that cause an anchor link to surround the HTML between them. When clicked, the anchor link requests another page of results to display. The optional attribute "count" requests that many results on the page to display. If not specified, the count requested on the current page is used. The advanced, optional "URL" attribute controls the domain to which the associated link is directed. By default the domain is https://search.atomz.com/search/ , but you can change this using the URL attribute.
Tag
Description
1
<search-next URL="https://search.yourdomain.com/search/"> ... </search-next>
<search-prev URL="https://search.yourdomain.com/search/"> ... </search-prev>
Displays the next or previous page of the results.
2
<search-sort-by-date URL="https://search.yourdomain.com/search/"> ... </search-sort-by-date>
<search-sort-by-score URL="https://search.yourdomain.com/search/"> ... </search-sort-by-score>
Sorts the results by date or by relevance.
3
<search-show-summaries URL="https://search.yourdomain.com/search/"> ... </search-show-summaries>
<search-hide-summaries URL="https://search.yourdomain.com/search/"> ... </search-hide-summaries>
Shows or hides the summaries.

Template conditional tags

Tags that let you conditionally include HTML between them.
Tag
Description
1
<search-if-results> ... </search-if-results>
<search-if-not-results> ...</search-if-not-results>
These tags include HTML if the current page contains any (or no) search results.
2
<search-if-prev-count> ... </search-if-prev-count>
<search-if-not-prev-count> ... </search-if-not-prev-count>
<search-if-next-count> ... </search-if-next-count>
<search-if-not-next-count> ... </search-if-not-next-count>
These tags include HTML if the previous page or the next page has any (or none) results associated with it.
3
<search-if-sort-by-score> ... </search-if-sort-by-score>
<search-if-not-sort-by-score> ... </search-if-not-sort-by-score>
<search-if-sort-by-date> ... </search-if-sort-by-date>
<search-if-not-sort-by-date> ... </search-if-not-sort-by-date>
These tags include HTML if the current page is, or is not, sorted by relevance or by date.
4
<search-if-show-summaries> ... </search-if-show-summaries>
<search-if-hide-summaries> ... </search-if-hide-summaries>
These tags include HTML if the current page is showing or hiding summaries. You can use these tags to include or exclude any portion of the search result.
5
<search-if-input-collections> ... </search-if-input-collections>
<search-if-not-input-collections> ... </search-if-not-input-collections>
These tags include HTML if a collection was specified in the generation of search results for the current page.
6
<search-if-advanced> ... </search-if-advanced>
<search-if-not-advanced> ... </search-if-not-advanced>
These tags include HTML if the sp_advanced=1 CGI parameter was specified for the search query.
7
<search-if-bad-param name="parameter-name"> ... </search-if-bad-param>
<search-if-not-bad-param name="parameter-name"> ... </search-if-not-bad-param>
These tags include or exclude the HTML between them if the given parameter is, or is not, invalid.
Currently only the sp_q_location[_#] parameter is supported.
8
<search-if-param name="param-name" value="param-value"> ... </search-if-param>
<search-if-not-param name="param-name" value="param-value"> ... </search-if-not-param>
These advanced tags include the HTML between them based on whether the CGI parameter specified in the "name" attribute has the value specified in the "value" attribute.
9
<search-if-sort-by-field name="field-name"> ... </search-if-sort-by-field>
<search-if-not-sort-by-field name="field-name"> ... </search-if-not-sort-by-field>
These advanced tags include the HTML between them if the current page is, or is not, sorted by the given field-name.

Template form control tags

Tags that let you control the default selection state for check boxes, radio buttons, and list boxes within a <form> on the search template.
Tag
Description
1
<search-input>
Used in a template in place of an <input> tag. When the tag is written to the browser, the word input replaces search-input and all other information in the tag is output as-is. In addition, if the name specified in the tag is listed as a CGI parameter and if the value specified in the tag is the value for that CGI parameter, then the word checked is added at the end of the tag. In this way, you can automatically make the default radio button or checkbox state in your search result the same as the current query.
For example, the HTML code for a check box might look like the following:
<input type=checkbox name="sp_w" value="exact">No sound-alike matching
The corresponding template code for that checkbox is the following:
<search-input type=checkbox name="sp_w" value="exact">No sound-alike matching
If the CGI parameter string for the query contains sp_w=exact , then the tag written to the browser with the search results looks like the following (the word checked is inserted at the end of the tag):
<input type=checkbox name="sp_w" value="exact" checked>No sound-alike matching
If the CGI parameter string for the query does not contain sp_w=exact , then the tag written to the browser with the search results looks like the following (the word checked is not listed in the tag):
<input type=checkbox name="sp_w" value="exact">No sound-alike matching
The <search-input> tag is useful for putting check boxes and radio buttons into your search template. If you have check boxes or radio buttons that you want to add to the <form> in your search template, use <search-input...> in place of <input...> .
2
<search-select> ... </search-select>
<search-option> ... </search-option>
Drop-down list boxes in a <form> tag are started with a <select> tag and ended with a </select> tag. The name for the associated CGI parameter is listed inside the <select> tag. Following the <select> tag is a list of <option> tags that specify the values to show inside the list box.
The <search-select> , </search-select> , <search-option> , and </search-option> tags provide similar functionality to the <search-input> tag. That is, the word selected is automatically added at the end of the <option> tag sent to the browser if the name in the <search-select> tag is listed as a CGI parameter and if the value of that CGI parameter is listed as the value in a particular <search-option> tag. In this way, you can automatically make the default list box choice in your search result the same as the current query.
For example, a typical list box looks like the following:
<select name="sp_x" size=1> <option value="any" selected>Anywhere</option> <option value="title">Title</option> <option value="desc">Description</option> <option value="keys">Keywords</option> <option value="body">Body</option> <option value="alt">Alternate text</option> <option value="url">URL</option> <option value="target">Target</option> </select>
The corresponding template code for that list box is the following:
<search-select name="sp_x" size=1> <search-option value="any">Anywhere</search-option> <search-option value="title">Title</search-option> <search-option value="desc">Description</search-option> <search-option value="keys">Keywords</search-option> <search-option value="body">Body</search-option> <search-option value="alt">Alternate text</search-option> <search-option value="url">URL</search-option> <search-option value="target">Target</search-option> </search-select>
If you have list boxes that you want to add to the <form> in your search template, use <search-select...> in place of <select...> , </search-select> in place of </select> , <search-option...> in place of <option...> , and </search-option> in place of </option> .
3
<search-sort-by-field name="field-name" count="XX"> ... </search-sort-by-field>
These advanced tags create an anchor link around the HTML between them. When this anchor is clicked, a page of results sorted on the given field is displayed. The optional count attribute specifies the number of results to display on the result page. If count is omitted, the count used on the current page is used.

Date format strings

You can use the following conversion specifications in date format strings:
Date format string
Description
%A
Matches the national representation of the full weekday name, for example, "Monday." The setting in Linguistics > Words & Languages > Language determines the national representation.
%a
Matches the national representation of the abbreviated weekday name, where the abbreviation is the first three characters, for example "Mon." The setting in Linguistics > Words & Languages > Language determines the national representation.
%B
Matches the national representation of the full month name, for example "June." The setting in Linguistics > Words & Languages > Language determines the national representation.
%b
Matches the national representation of the abbreviated month name, where the abbreviation is the first three characters, for example "Jun." The setting in Linguistics > Words & Languages > Language determines the national representation.
%D
Equivalent to "%m/%d/%y", for example "07/25/13".
%d
Matches the day of the month as a decimal number (01-31).
%e
Matches the day of month as a decimal number (1-31). A blank precedes single digits.
%H
Matches the 24-hour clock as a decimal number (00-23).
%h
Matches the national representation of the abbreviated month name, where the abbreviation is the first three characters, for example "Jun" (the same as %b).
%I
Matches the 12-hour clock as a decimal number (01-12).
%j
Matches the day of the year as a decimal number (001-366).
%k
Matches the (24-hour clock as a decimal number (0-23). A blank precedes single digits.
%l
Matches the hour 12-hour clock as a decimal number (1-12). A blank precedes single digits.
%M
Matches the minute as a decimal number (00-59).
%m
Matches the month as a decimal number (01-12).
%p
Matches the national representation of either "ante meridiem" or "post meridiem" as appropriate, for example "PM." The setting in Linguistics > Words & Languages > Language determines the national representation.
%R
Equivalent to "%H:%M", for example, "13:23".
%r
Equivalent to "%I:%M:%S %p", for example, "01:23:45 PM".
%S
Matches the second as a decimal number (00-60).
%T
Equivalent to "%H:%M:%S", for example, "13:26:47".
%U
Matches the week number of the year (Sunday as the first day of the week) as a decimal number (00-53).
%v
Equivalent to "%e-%b-%Y", for example, "25-Jul-2013".
%Y
Matches the year with century as a decimal number, for example, "2013".
%y
Matches the year without century as a decimal number (00-99).
%Z
Matches the time zone name.
%%
Matches "%".

Language identifiers

The following table contains the language identifiers for each supported language. You can use these identifiers as values for the optional "language" attribute in the following template tags:
Language
Language identifier
Bulgarian (Bulgaria)
bg_BG
Chinese (China)
zh_CN
Chinese (Hong Kong)
zh_HK
Chinese (Singapore)
zh_SG
Chinese (Taiwan)
zh_TW
Czech (Czech Republic)
cs_CZ
Danish (Denmark)
da_DK
Dutch (Belgium)
nl_BE
Dutch (Netherlands)
nl_NL
English (Australia)
en_AU
English (Canada)
en_CA
English (Great Britain)
en_GB
English (United States)
en_US
French (Belgium)
fr_BE
French (Canada)
fr_CA
Finnish (Finland)
fi_FI
French (France)
fr_FR
French (Switzerland)
fr_CH
German (Austria)
de_AT
German (Germany)
de_DE
German (Switzerland)
de_CH
Greek (Greece)
el_GR
Irish Gaelic (Ireland)
ga_IE
Italian (Italy)
it_IT
Japanese (Japan)
ja_JP
Korean (Korea)
ko_KR
Norwegian (Norway)
no_NO
Polish (Poland)
pl_PL
Portuguese (Brazil)
pt_BR
Portuguese (Portugal)
pt_PT
Russian (Former Soviet Union)
ru_SU
Slovak (Slovakia)
sk_SK
Slovak (Slovenia)
sl_SI
Spanish (Mexico)
es_MX
Spanish (Spain)
es_ES
Swedish (Sweden)
sv_SE

Specifying the content-type HTTP header

You can specify the Content-Type HTTP response header by using the following tag:
<search-content-type-header [content="MIME-type"] [charset="charset-name"]>
The content and charset attributes are optional. This tag should appear as early as possible in the template. It is also recommended that it appear before either <search-html-meta-charset> or <search-xml-decl> , because it affects the behavior of those tags.
If you do not specify the content attribute, then the value of MIME-type defaults to the value that is set in Settings > Crawling > Content Types . If you specify a content attribute, it is used as the default content attribute for the <search-html-meta-charset> tag.
If you do not specify the charset attribute, then no charset value is written to the content-type header.
If you specify charset="1" then the actual value for charset-name is the value of the sp_f CGI parameter. If no sp_f CGI parameter is submitted with the search, then the actual value for charset-name is read from your account settings. You can view or change the character set that is associated with your account under Settings > My Profile > Personal Information > Character Encoding .
You can choose a specific character set name by listing it as the charset value, like charset="iso-8859-1" or charset="Shift-JIS" .
If you specify a charset attribute, then it is used as the default charset attribute for the <search-html-meta-charset> and <search-xml-decl> tags, as well as being output to the content-type header.

Specifying a character set in an HTML template

The default HTML search result templates specify the character set associated with the current account via the following tag:
<search-html-meta-charset [content="MIME-type"] [charset="charset-name"]>
The content and charset attributes are optional. This tag must appear in the HTML <head> section of the template. This tag results in the following tag on the HTML page generated from the template:
<meta http-equiv="content-type" content="MIME-type; charset=charset-name">
If you do not specify the content attribute, then the actual value of MIME-type defaults to one of two values. If the <search-content-type-header> tag specified a content attribute, then that value is used. Otherwise, the value used is the one set in the Templates > Settings > Content Type tab.
If you do not specify the charset attribute, then the actual value of charset-name defaults to one of two values. If the <search-content-type-header> tag specified a charset attribute, then that value is used. Otherwise, the actual value for charset-name is read from your account settings. You can view or change the character set that is associated with your account under Settings > My Profile > Personal Information > Character Encoding .
If you specify charset="1" then the actual value for charset-name is the value of the sp_f CGI parameter. If no sp_f CGI parameter is submitted with the search, then the actual value for charset-name is either the value set in the <search-content-type-header> tag if it was specified, or the value that is set in your account settings.
You can specify a specific character set name, as in charset="charset-name" . For example, charset="iso-8859-1" or charset="Shift-JIS" .
The <search-html-meta-charset> tag is optional. If you remove it, the browser assumes the default values for content-type , which is the following: content="text/html; charset=ISO-8859-1" . You can also choose to replace the <search-html-meta-charset> tag with your own http-equiv tag.

Specifying a character set in an XML template

The default XML search result template specifies the character set associated with the current account by way of the following tag:
<search-xml-decl [charset="charset-name"]>
The charset attribute is optional. This tag must appear at the top of the template, but after any <search-content-type-header> tag. This tag results in the following tag on the XML document that is generated from the template:
<?xml version="1.0" encoding="charset-name" standalone="yes" ?>
If you do not specify the charset , then the actual value of charset-name defaults to one of two values. If <search-content-type-header> specified a charset attribute, then that value is used. Otherwise, the actual value for charset-name is read from your account settings. You can view or change the character set that is associated with your account under Settings > My Profile > Personal Information > Character Encoding .
If you specify charset="1" then the actual value for charset-name is the value of the sp_f CGI parameter. If no sp_f CGI parameter is submitted with the search, then the actual value for charset-name is either the value that is set in the <search-content-type-header> tag if it was specified, or the value that is set in your account settings.
You can specify a specific character set name, as in charset="charset-name" , if you so desire. For example, charset="iso-8859-1" or charset="Shift-JIS" .
You can choose to replace the <search-xml-decl> tag with your own ?xml tag.

Including a search template within another

To include one search template in another, use the <search-include> tag, setting the file attribute to the name of the template file that you want to include as in the following example:
<search-include file="seo/seo_search_title.tpl" />
SEO search template segments are in the seo/ subfolder and normal search templates are in the templates/ subfolder. Only .tpl files are meaningful to include in this context.

Managing multiple transport templates for your website

You can control the appearance of search results across your website by using different search transport templates for each area.
To accomplish this kind of search functionality, you can manage your transport templates in site search/merchandising. Or, you can manage your transport templates in Publish. Like site search/merchandising, Publish lets you edit, preview, and publish multiple search transport templates.
To set up your search forms to use a specific transport template (other than the default), use the sp_t query parameter. For example, suppose you have a search template called "clearance" for the marked-down sales area of your website. You use the standard HTML search form with the following additional form code:
<input type=hidden name="sp_t" value="clearance">
When a customer clicks a standard form that contains this line of code, the "clearance" search transport template is displayed along with their search results.