Template functions

std_web_publisher defines some additional HSVT template functions for use in setting up the layout of public pages.

function std:web-publisher:page-part:render(name)

Renders the named page part.

function std:web-publisher:page-part:render-category(category)

Renders all page parts for the given category, in order of their sort priority. Allows composible definitions of sets of page parts to be rendered together on public pages.

function std:web-publisher:block(block)

Defines a named block to be rendered in the appropriate location in the publication layout().

This is typically used to define a section of UI that to be rendered e.g. below the main content of the page, in the sidebar, etc.

function std:web-publisher:platform-style-tag()

Includes the web publisher platform stylesheet.

function std:web-publisher:object:link(object, title)

Renders a link to the object in this publication. The title argument is optional, to allow links with text other than the object title to be generated. If an anonymous block is given, it is rendered instead of the title.

function std:web-publisher:file:thumbnail(file)

Renders a thumbnail of the file.

function std:web-publisher:utils:title:name(personObject)

A utility for rendering names of people. Takes the name of the storeObject passed in, and renders it as “Lastname, Firstname”.

function std:web-publisher:template(code)

Renders the replaceable template code, using the following anonymous block e.g.

std:web-publisher:template("example:web-publisher:primary-call-to-action") {
    "Call to action" // This will be used as the button text
}