Current Release

This documentation covers the latest release of VIVO, version 1.10.x.
If you are able to help contribute to this documentation, please contact sysadmin at duraspace dot org
Looking for another version? See all documentation.

Skip to end of metadata
Go to start of metadata

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

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 *

http://yourLocalInstance.com/freemarkersamples

* 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