TextFormatter Viewtool

Last Updated: Aug 20, 2021
documentation for the dotCMS Content Management System

The TextFormatter is a helper class to simplify tool usage when retrieving no-arg messages from the default bundle that have periods in their key.

The following example shows how the TextFormatter is mapped in the toolbox.xml file:



So instead of '$text.get(“forms.profile.title”)', you can just type $text.forms.profile.title. This also lets you do things like:

#if($text.forms.profile.exists )
    #set( $profiletext = $text.forms.profile )


On this page


We Dig Feedback

Selected excerpt: