Velocity Scripting

Last Updated: Oct 18, 2023
documentation for the dotCMS Content Management System

For front end development dotCMS uses Apache Velocity — an easy to use template engine. By exposing Java methods as understandable tools (Viewtools), dotCMS frees web developers to focus on building a powerful dynamic site without the need to write Java code.

Velocity can be used in templates, containers, custom fields and contentlets within dotCMS. dotCMS exposes a number of Viewtools that ship with Velocity, as well as some additional dotCMS-specific tools. For a list of tools exposed, see the documentation on the toolbox.xml, which is the configuration file for viewtools.

Velocity resources, such as macros, are cached in the Velocity2 region, which can be easily flushed through the Cache tab of the Maintenance panel.

To experiment with code before you deploy, try the Velocity Playground in the Admin Panel.

On this page


We Dig Feedback

Selected excerpt: