<@td.searchResultUrl>
The searchResultUrl tag generates a url to a
tag-defined search.
This tag contains the following attributes:
-
query
- The query.
- Required: false
- Type: String
- Default: *
-
scope
- The scope of the @var attribute. Valid values are
"page" and "request".
- Required: false
- Type: String
- Default: "request"
-
urlQuery
- The query string. This value will NOT be URL-encoded, so it
should be encoded already. You can also use nested <@td.urlParam> tags
to specify individual URL parameters in a URL-escaped way.
- Required: false
- Type: String
- Default: none
-
var
- The name of the variable used to access the result.
- Required: false
- Type: String
- Default: none
Example Usage:
This tag provides a way to generate links to "canned" searches to direct users to certain collections of content.
<@td.searchResultUrl query="Titania" />
The above would add a link to the Search page with a
query for Titania
. As with the other url-generating tags, this is best used as the value to the
href
attribute of an anchor tag:
<a href=<@td.searchResultUrl query="Titania" />>Search for "Titania"</a>
The url could also be stored in a variable and used later in the page:
<@td.searchResultUrl var=url query="Titania" /> . . . <a href=${url}>Search for "Titania"</a>
Lastly, the search can be refined by adding any number of metadataFilter tags to the body:
<@td.searchResultUrl query="Titania" > <@td.metadataFilter name="product" value="Delivery" /> <@td.metadataFilter name="version" value="2.0" /> </@td.searchResultUrl>