macros.ftl

The default Portal Themes contain several Freemarker macros that encapsulate complex operations.
customViewerExtensions
This variable is used inside several of the macros in this template to map a file extension to a particular custom template.
extension
This macro is used to return the filename extension for a given filename.
searchResultUrl
This macro accepts a and generates a url to the page best suited to render it for viewing. If the document has a filename extension that is found in the customViewerExtensions object, then the appropriate custom page is rendered. Otherwise, if it is DITA-based, either viewer.ftl or mapViewer.ftl are used to render the page. If not, the responsibility of rendering will be handed off to the browser's native capability for rendering the given filetype.
searchResultTitle
This macro will return the title for a particular object, meant to be used as the link text. If one exists, a document's searchTitle will be preferred to its title.
searchResultLink
This macro returns a link to a given . It accepts an optional class name that will be set as the class attribute on the generated anchor tag.