Built-in Variables & Reserved Words

Last Updated: Feb 19, 2024
documentation for the dotCMS Content Management System

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. While past versions have regarded these case sensitively, current practice is to evaluate them case insensitively when validating a new variable.

archivedbaseTypeclass
conFolderconHostcontentType
deleteddisabledWYSIWYGfile
formhostidentifier
inodelanguageIdlive
lockedmodDatemodUser
numberownerownerCanPublish
ownerCanReadownerCanWritepermissions
stringstInodetype
websiteworking

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:

ifelseend
foreachparse

On this page

×

We Dig Feedback

Selected excerpt:

×