There are a number of variables which are available to you from containers, templates, or contentlets.
Velocity Variables
The following lists are grouped by scope.
Usable anywhere in dotCMS
| |
$EDIT_MODE | $HTMLPAGE_SECURE |
$host | $HTMLPAGE_REDIRECT |
$HTML_PAGE_LAST_MOD_DATE | $HTMLPAGE_TITLE |
$HTMLPAGE_INODE | $quote |
$HTMLPAGE_FRIENDLY_NAME | $TEMPLATE_INODE |
$HTMLPAGE_META | $VTLSERVLET_URI |
Usable from a container
| |
$ADD_CONTENT_PERMISSION | $containerInode |
$CONTAINER_IDENTIFIER_INODE | $CONTENTLETS |
$CONTAINER_INODE | $EDIT_CONTAINER_PERMISSION |
$CONTAINER_MAX_CONTENTLETS | $SERVER_NAME |
$CONTAINER_NUM_CONTENTLETS | $SORT_PAGE |
$CONTAINER_NAME | $STATIC_CONTAINER |
$CONTAINER_STRUCTURE_NAME | |
Content properties
| |
$content.identifier | $content.permission |
$content.inode | $content.title |
$content.modDate | $content.titleImage |
Other Reserved Words or Variable Names
The following reserved words should not be used for velocity variable names, form fields, or dotCMS object names; they are reserved words that are in use by dotCMS methods.
| | |
class | languageId | ownerCanRead |
conFolder | live | ownerCanWrite |
conHost | locked | permissions |
deleted | modDate | string |
file | modUser | structureInode |
form | number | type |
host | owner | website |
identifier | ownerCanPublish | working |
inode | | |
Additionally, the following words may not be used as anchor names, because they are velocity commands that are preceded by a hash (#
) in the same way as WYSIWYG anchors: