UI functions
UI template functions modify the rendered view to control the standard Haplo page.
See the example template for an example of their use.
pageTitle(…)
All arguments are rendered, concatenated, and the pageTitle
in the view is set to the string.
backLink(…) { label }
The arguments are interpreted as a URL, and backLink
in the view is set to that URL. The optional anonymous block is rendered if present, and backLinkText
is set to that string.
To set a back link to an object, use this with the std_object_url template function:
backLink(std:object:url(object))
std:plugin:resources(…)
Each argument to this template function includes a resource from the plugin’s static
directory, including the CSS or client side JavaScript resource in the generated HTML page. For example, to include a CSS and a JavaScript file,
std:plugin:resources("example.css" "example.js")
This only works when you’re using the default HTML layout. If you’re generating the entire page yourself, you’ll have to write your own tags.
This is an alternative to calling the useStaticResource()
function on the Response
object, but can be used when you’re not generating the entire response.
If you want to include generated CSS and JavaScript files, use the std:resources
template.
emailSubject(…)
All arguments are rendered, concatenated, and the emailSubject
in the view is set to the string.
Layout functions
The layout functions choose a Haplo layout, setting the layout
property in the view.
std:layout:standard() std:layout:minimal() std:layout:wide() std:layout:none() std:layout:empty() std:layout:clear()
See layout
for details of the layouts.