The Titania Tag Library
Titania Delivery provides a custom tag library that allows for accessing powerful
features of Titania Delivery and easier customization of Portal Themes.
The tag library can be included on any page via <#assign
td=JspTaglibs['http://www.titaniasoftware.com/harp/taglib']/>
. The
td
identifier can be replaced with any valid name. This directive must be
included on every top-level template file that uses the tag library, and is not supplied
to
pages by the infrastructure. Once included on the page, custom tags can be accessed
with
<@td.tagName atts... />
.
In this section:
- <@td.assemblies>Retrieves a user's Assembly collection and stores them in the @var
- <@td.assemblyEditorUrl>The assemblyEditorUrl tag generates the URL to the Assembly editor for the current Portal. If @var is specified, this tag stores the URL in the given variable, otherwise it places it onto the page.
- <@td.assemblyViewerUrl>The assemblyViewerUrl tag provides a url to the viewer page of a given Assembly
- <@td.content>The content tag inserts the requested content from the TD repository into the given page. If there is an error rendering the content to the page, the body of the tag will be displayed instead. If the content is empty, a boilerplate HTML snippet indicating an error is inserted.
- <@td.fileProperties>The fileProperties tag stores an ItemDataAccess object in @var that can be used to interrogate the properties of a file. If the file does not exist or is not accessible from the portal, no value is stored in the variable.
- <@td.groupSearch>The groupSearch tag executes a search over the contextualized content in the portal (i.e. DITA topics used by maps) as well as top-level publications, grouping the results by their context and storing the results in a variable. The result placed into @var is a SearchResultsPage. Note that the prevailing metadata search values (from the search request URL parameters) will be appended to the search query specified in the query attribute. This may lead to unexpected results if the tag is invoked in various search results contexts.
- <@td.httpRequest>The httpRequest tag executes an http request and sets the given variable to the response body returned by the request. Added in version 4.2.
- <@td.markdown>The markdown tag treats the contents of the tag as Markdown syntax to be rendered as HTML.
- <@td.metadataFilter>The metadataFilter tag allows for adding filters to <@td.search>, <@td.groupSearch>, and <@td.searchResultUrl> tags.
- <@td.pageUrl>The pageUrl tag computes the URL to a custom page in the portal's theme.
- <@td.pipelineParam>The pipelineParam tag is used exclusively inside content tags to specify pipeline parameters. The Content tag displays content after being processed through any number of processing pipelines. This tag allows for passing parameters to those pipelines.
- <@td.portalUrl>The portalUrl tag provides the URL of a page relative to the root of the Portal website. If the @var attribute is specified, the URL is stored in the given variable, otherwise it is written to the page.
- <@td.recordPageview>The recordPageview tag inserts an invisible HTML <img> element that results in a 1x1 pixel, transparent graphic. The request of this graphic will cause the server to record a pageview of the document described by the tag's attributes. This enables pageviews to be recorded even when the page is served from a browser cache or other cache. If the content whose pageview is being recorded is subsequently requested separately, e.g. a graphic, IFRAME, or multimedia object, add ?recordPageview=false to the viewer URL to avoid double-counting the view. Added in version 4.2.
- <@td.requestPart>The requestPart tag is formatted as a multipart/form part of a request body. Added in version 4.2.
- <@td.search>The search tag executes a search with the given parameters and adds the results to the model available to the current template. The result is an array of DocumentSearchInfo objects. Note that the prevailing metadata search values (from the search request URL parameters) will be appended to the search query specified in the query attribute. This may lead to unexpected results if the tag is invoked in various search results contexts.
- <@td.searchResultUrl>The searchResultUrl tag generates a url to a tag-defined search.
- <@td.setContentFilter>This tag allows you to specify a search clause that will be used for every content query, enabling the filtering of content returned by the search engine universally. For example, a user could specify a country on the portal landing page; that country could be used to set a global filter such that only content relevant for the selected country - for example, "country_md:US" - is served for the remainder of the session. The filter can be cleared by passing an empty string to the 'filter' attribute. Added in version 4.2.1.
- <@td.themeFileUrl>The themeFileUrl tag Generates the URL to a file in the Portal Theme's "static" folder.
- <@td.urlParam>The urlParam tag specifies a URL parameter that will be appended to tag-generated urls.
- <@td.viewerUrl>The viewerUrl tag provides the URL to a given piece of content, represented by DocumentSearchInfo object
- <@td.xslParam>The xslParam tag is used inside content tags to specify XSLT parameters.
Previous topic: Template Variable Types
Parent topic: Page Templates