Built-in Variables & Reserved Words

Last Updated: Apr 19, 2022
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

$quote
$host
$HTMLPAGE_INODE
$HTMLPAGE_TITLE
$HTMLPAGE_FRIENDLY_NAME
$TEMPLATE_INODE
$HTMLPAGE_META
$HTMLPAGE_META
$HTMLPAGE_SECURE
$VTLSERVLET_URI
$HTMLPAGE_REDIRECT
$HTML_PAGE_LAST_MOD_DATE
$EDIT_MODE

Usable from a container

$SERVER_NAME
$CONTAINER_IDENTIFIER_INODE
$CONTAINER_INODE
$CONTAINER_MAX_CONTENTLETS
$CONTAINER_STRUCTURE_NAME
$STATIC_CONTAINER
$SORT_PAGE
$containerInode
$EDIT_CONTAINER_PERMISSION
$ADD_CONTENT_PERMISSION
$CONTENTLETS
$CONTAINER_NUM_CONTENTLETS
$CONTAINER_NAME
$CONTAINER_STRUCTURE_NAME

Content properties

$content.permission
$content.inode
$content.identifier
$content.title
$content.titleImage
$content.modDate

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
conFolder
conHost
deleted
file
form
host
identifier
inode
languageId
ownerCanPublish
modUser
live
locked
modDate
modUser
number
owner
ownerCanPublish
ownerCanRead
ownerCanWrite
permissions
structureInode
string
type
website
working

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:

if
else
end
foreach
parse

On this page