To generate HTML document with FreeMarker, you have to use the module voidframework-template-freemarker.



Templates location

By default, templates should be placed in the resources/views directory.


The following configuration keys can be used in the configuration file of your application:

  • voidframework.template.basePackagePath the location of the templates. The default value is "/views/".

Built-in methods & variables

By default, modules web and template-freemarker provide a set of methods and variables that will be accessible in templates.

configRetrieves a value from the configuration
displaySizeDisplays a formatted number with the correct unit (Kio, Mio, Gio, …)
i18n / _Translates a message
urlforRetrieves an URL from the router (reverse router)
isDevModeIndicates whether the application is in dev mode
langContains the current language
languagesContains all available languages
voidFrameworkVersionContains the current Void Framework version