Built-in Variables & Reserved Words - Documentation topics on: built-in velocity variables,reserved words,.

Built-in Variables & Reserved Words

There are a number of variables which are available to you from Containers, Templates, or Contentlets.

From anywhere in dotCMS you can use the following Velocity variables.

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

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

If the Container has notes

  $CONTAINER_NOTES

If the container is dynamic

  $CONTENTS_PER_PAGE
  $CONTENTS_PER_PAGE
  $CURRENT_PAGE
  $CURRENT_PAGE
  $LUCENE_QUERY

The following properties are available on Content

  $content.permission
  $content.inode
  $content.identifier
  $content.contentTitle
  $content.contentLastModDate

Reserved Words/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
if, else, end, foreach, parse, ... 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