Old Release

This documentation relates to an old version of VIVO, version 1.10.x. Looking for another version? See all documentation.

Template variables are made available to render dynamic content within the application. To print a variable's value in FreeMarker, use the following syntax:

Some variables have methods which can be used to return a value or perform a task such as adding a stylesheet or script to the <head> element.
${stylesheets.add('<link rel="stylesheet" href="mystylesheet.css" />')}
${headScripts.add(<script type="text/javascript" src="myscript.js"></script>)}

Special template directives provide debugging features that assist in template development.
<@describe var="stylesheets" />
(describe the methods callable on a template variable)

<@dump var ="stylesheets" />
(dump the contents of a template variable)

<@dumpAll />
(dump the contents of the template data model)

A sample page at *


* demonstrates most of the methods and directives available within a template. The template file responsible for this page is vitro-core/webapp/web/templates/freemarker/body/samples.ftl.

  • No labels