Velocity Viewtools documentation for the dotCMS Content Management System

Viewtools are Java classes that encapsulate functionality and are exposed to Velocity. All Velocity contexts have access to use Viewtools. Viewtools are mapped to a key in velocity in the toolbox.xml file, which is loaded at startup. Viewtools can also be mapped dynamically, using OSGI.

Viewtools are important for web developers to understand as they provide access to the dotCMS content repository along with a huge amount of methods and utilities that help with functions such as String formatting, date formatting and calculation, XML/JSON manipulation, floating point math, and other functions often needed when building the display layer.

Viewtools allow Java developers to build custom APIs and Java classes that integrate and encapsulate business systems and functionality for use by the web development team.