Variables

Content is passed through to a Template by assigning variables to Smarty. These variables may be of various data types, like strings, integers, booleans or even nested arrays or objects. Following you will find a list of variables which are available in your Templates by default. In case you want to add custom variables to your Templates you should use an Extension.

$contentareas

Content assigend to content areas of a Page or E-Mailing will be available in your Templates through the array $contentareas. For more information you should have a look at Examples: Rendering content.
  1. Array(                                      array Array of n Content areas
  2.     [contentarea_name] => Array(            string Content area name (Array-Index)
  3.         [CBLOCKS] => Array(                 array Array of n Content Blocks contained in that Contentarea
  4.             [0] => Array(
  5.                 [OBJECTID] => 225           int Content Block Id
  6.                 [FOLDER] => 0               int 1 if folder, 0 if not
  7.                 [VERSION] => 3              int Content Block version
  8.                 [EMBEDDED] => 1             int 1 if embedded Content Block, 0 if not
  9.                 [HASCHANGED] => 0           int 1 if changed since last approval, 0 if not
  10.                 [PNAME] => NULL             string Permanent name (NULL if Content Block is embedded)
  11.                 [LINKID] => 5               int Link Id between Page and Content Block
  12.                 [RREAD] => 1                int 1 if User owns Permissions to read this Object, 0 if not
  13.                 [CBLOCKVERSION] => 3        int Content Block Version
  14.                 [ENTRYMASKS] => Array(      array Array of n Entrymasks contained in that Content Block
  15.                     [0] => Array(
  16.                         [LINKID] => 236                                     int Link Id between Content Block and Entrymask
  17.                         [ENTRYMASKID] => 8                                  int Entrymask Id
  18.                         [CODE] => 'richtext_paragraph'                      string Entrymask code
  19.                         [ENTRYMASKNAME] => 'Richtext paragraph'             string Entrymask name
  20.                         [FORMFIELDS] => Array(                              array Array of n Formfields contained in the above Entrymask
  21.                             [headline] => Array(                            string Entrymask identifier
  22.                                 [LINKID] => 236                             int Link Id between Content Block and Entrymask
  23.                                 [ENTRYMASKID] => 8                          int Entrymask Id
  24.                                 [CODE] => 'richtext_paragraph'              string Entrymask code
  25.                                 [ENTRYMASKNAME] => 'Richtext paragraph'     string Entrymask name
  26.                                 [IDENTIFIER] => 'headline'                  string Formfield identifier
  27.                                 [TYPE] => 'TEXT'                            string Formfield type
  28.                                 [ID] => 577                                 int Auto increment Id in Formfields table
  29.                                 [FORMFIELD] => 1                            int Formfield type Id
  30.                                 [ENTRYMASKFORMFIELD] => 12                  int Link Id between Entrymask and Formfield
  31.                                 [NAME] => 'Headline'                        string Formfield Name
  32.                                 [CBLOCKID] => 225                           int Content Block Id
  33.                                 [PRESET] => 'no content yet'                string Formfield preset value
  34.                                 [WIDTH] => '4'                              string Formfield width
  35.                                 [MAXLENGTH] => '22'                         string Formfield maximum length
  36.                                 [CONFIG] => 'bold,italic,underline'         string Formfield config (required for Richtext editor)
  37.                                 [CUSTOM] => '/www/tst_frontend/frontend/'   string Formfield custom config (required for Richtext editor)
  38.                                 [VALUE] => 'test'                           string Formfield value
  39.                             )
  40.                             ...
  41.                         )
  42.                     )
  43.                     ...
  44.                 )
  45.             )
  46.             ...
  47.         )
  48.     )
  49.     ...
  50. )

$tree

$tree stores all Pages of the current Site as a list which is ordered identical to the tree in yeager itself. So, for example, the fifth Page of a fully expanded tree is the fifth element of the array $tree which is passed into Smarty. For more information you should have a look at  Examples: Rendering menus.
  1. Array(                                  array Array of n Pages
  2.     [0] => Array(
  3.         [LFT] => 1                      int Id of the left node in the nested set tree structure
  4.         [RGT] => 6                      int Id of the right node in the nested set tree structure
  5.         [VERSIONPUBLISHED] => 0         int Published version (either a specific version or 999999 if set to 'ALWAYS_LATEST_APPROVED_VERSION')
  6.         [ID] => 1                       int Id
  7.         [LEVEL] => 1                    int Level in tree
  8.         [PARENT] => 0                   int Parent Id
  9.         [PNAME] => 'homepage'           string Permanent name
  10.         [VERSION] => 0                  int Version
  11.         [ACTIVE] => 1                   int 1 if active, 0 if inactive
  12.         [HIDDEN] => 0                   int 1 if hidden, 0 if visible
  13.         [LOCKED] => 0                   int 1 if locked by an User, 0 if not
  14.         [NAVIGATIONID] => 0             int Navigation Id
  15.         [HASCHANGED] => 0               int 1 if changed since last approval, 0 if not
  16.         [TEMPLATEID] => 1               int Template Id
  17.         [CREATEDTS] => 0                int Timestamp of the creation
  18.         [CHANGEDTS] => 0                int Timestamp of the last change
  19.         [CREATEDBY] => 1                int Id of the User who created the Object
  20.         [CHANGEDBY] => 0                int Id of the last User who touched the Object
  21.         [NAVIGATIONNAME] => 'Navi 1'    string Navigation name
  22.         [NAVIGATIONCODE] => 'navi_1'    string Navigation code
  23.         [OID] => 1                      int Id
  24.         [NAME] => 'Homepage'            string Name
  25.         [TITLE] => 'Homepage Title'     string Title (dynamic Property)
  26.         [DESCRIPTION] => 'Home Desc.'   string Description (dynamic Property)
  27.         [RREAD] => 1                    int 1 if User owns Permissions to read this Object, 0 if not
  28.         [RWRITE] => 1                   int 1 if User owns Permissions to write this Object, 0 if not
  29.         [RDELETE] => 1                  int 1 if User owns Permissions to delete this Object, 0 if not
  30.         [RSUB] => 1                     int 1 if User owns Permissions to create subnodes under this Object, 0 if not
  31.         [RSTAGE] => 1                   int 1 if User owns Permissions to publish/approve this Object, 0 if not
  32.         [RMODERATE] => 1                int 1 if User owns Permissions to moderate Comments of this Object, 0 if not
  33.         [RCOMMENT] => 1                 int 1 if User owns Permissions to add Comments to this Object, 0 if not
  34.         [LASTAPPROVED] => 0             int Latest approved version
  35.         [SELECTED] => 1                 int 1 if node is the current node, 0 if not
  36.         [SUBOPEN] => 1                  int 1 if node has opened subnodes, 0 if not
  37.         [CHILDREN] => 2                 int Count of children of this node or NULL
  38.         [FIRST] => 0                    int 1 if node is the first node on the current level, 0 if not
  39.         [LAST] => 1                     int 1 if node is the last node on the current level, 0 if not
  40.         [HASSUBNODES] => 1              int 1 if node has subnodes, 0 if not
  41.     )
  42.     ...
  43. )

$webroot

In case you are running yeager from a subfolder (not directly from your document root), the $webroot string will include that subdirectory.
  1. /subdirectory/

$templatedoc

$templatedoc contains the relative path to the Templates directory configured in your config file. Most commonly it is used to prefix the path to CSS, JS or image files.
  1. /frontend/templates/

$templatedir

$templatedir contains the server path to the Templates directory. You should use that one to include other template files from within Smarty.
  1. /var/www/httpdocs/frontend/templates/
In Smarty you can use following syntax to include a file:
  1. {include file="$templatedir/header.html"}

$templatedirabsolut

$templatedirabsolut contains the absolute path (including domain and http or https prefix) to your Template directory.
  1. http://www.exampledomain.com/frontend/templates/

$extensiondoc

$extensiondoc includes the relative path to the Extension directory configured in your config file.
  1. /frontend/extensions/

$pageinfo

$pageinfo includes general information about the Page and it's parents. Basically the return of the Page->get() call, plus an array which contains all parental nodes.
  1. Array(
  2.     [ID] => 10                          int Property Id (versioned Object Id)
  3.     [OBJECTID] => 2                     int Id
  4.     [VERSION] => 5                      int Version
  5.     [APPROVED] => 1                     int 1 if approved, 0 if unapproved
  6.     [CREATEDBY] => 1                    int Id of the User who created the Object
  7.     [CHANGEDBY] => 1                    int Id of the last User who touched the Object
  8.     [HASCHANGED] => 1                   int 1 if changed since last approval, 0 if not
  9.     [TEMPLATEID] => 3                   int Template Id
  10.     [COMMENTSTATUS] => 1                int 1 if commenting is allowed, 0 if not
  11.     [COMMENTSTATUS_AUTO] => 1           int 1 if commenting will be closed automatically after the configured time-period, 0 if not
  12.     [NAVIGATIONID] => 0                 int Navigation Id
  13.     [ACTIVE] => 1                       int 1 if active, 0 if inactive
  14.     [HIDDEN] => 1                       int 1 if hidden, 0 if visible
  15.     [LOCKED] => 0                       int 1 if locked by an User, 0 if not
  16.     [LOCKUID] => 1                      int Id of the User who locked the Object
  17.     [TOKEN] => 'sess_36024_74'          string Lock token, required to relock/unlock this Object
  18.     [DELETED] => 0                      int 1 if in Trashcan, 0 if not
  19.     [CREATEDTS] => 1331135843           int Timestamp of the creation
  20.     [CHANGEDTS] => 1339513231           int Timestamp of the last change
  21.     [VERSIONPUBLISHED] => 999999        int Published version (either a specific version or 999999 if set to 'ALWAYS_LATEST_APPROVED_VERSION')
  22.     [LEVEL] => 2                        int Level in the tree structure
  23.     [PARENT] => 1                       int Parent Id
  24.     [PNAME] => 'Overview'               string Permanent name
  25.     [NAVIGATIONNAME] => 'Top Navi'      string Navigation name
  26.     [NAVIGATIONCODE] => 'top_navi'      string Navigation code
  27.     [NAME] => 'Overview'                string Name
  28.     [TITLE] => 'Overview Title'         string Title (dynamic Property)
  29.     [DESCRIPTION] => 'Overview Desc.'   string Description (dynamic Property)
  30.     [PARENTS] => Array(                 array Including all parent nodes
  31.         [0] => Array(
  32.             [0] => Array(
  33.                 [LFT] => 1
  34.                 [RGT] => 10
  35.                 [VERSIONPUBLISHED] => 0
  36.                 [ID] => 1
  37.                 [LEVEL] => 1
  38.                 [PARENT] => 0
  39.                 [PNAME] => 'pub'
  40.                 [VERSION] => 0
  41.                 [ACTIVE] => 1
  42.                 [HIDDEN] => 0
  43.                 [LOCKED] => 0
  44.                 [TEMPLATEID] => 1
  45.                 [NAME] => 'Public'
  46.             )
  47.         )
  48.     )
  49.     ...
  50. )

$siteinfo

$siteinfo is an array which contains general information about the current Site.
  1. Array(
  2.     [ID] => 10                          int Property Id (versioned Object Id)
  3.     [OBJECTID] => 2                     int Id
  4.     [NAME] => 2                         int Name
  5.     [DEFAULTTEMPLATE] => 0              int Id
  6.     [TEMPLATEROOT] => 0                 int Id of the Template root directory
  7.     [PNAME] => 'pub'                    string Permanent name (name in URL)
  8.     [FAVICON] => 4711                   int File Id of the assigned Favicon
  9.     [FAVICON_URL] => '/image/4711'      string URL of the assigned Favicon
  10. )

$user

$user is an array including information about the currently logged in User.
  1. Array(
  2.     [LOGIN => 'email@acme.com'
  3.     [ID] => 121
  4.     [COMPANY] => 'ACME Inc.'
  5.     [DEPARTMENT] => 'Management'
  6.     [FIRSTNAME] => 'Chuck'
  7.     [LASTNAME] => 'Norris'
  8.     [FULLNAME] => 'Chuck Norris'
  9.     [PHONE] => '555 1232321'
  10.     [FAX] => '555 1232322'
  11.     [MOBILE] => '555 1232323'
  12.     [WEBSITE] => 'http://www.acme.com'
  13.     [PROFILEPICTURE] => 121
  14.     [EMAIL] => "email@acme.com"
  15.     [TIMEZONE] => 'Europe/Berlin'
  16.     [WEEKSTART] => 1
  17.     [DATEFORMAT] => 'dd.mm.YYYY'
  18.     [TIMEFORMAT] => 24
  19. )

$untitledparams

You can pass parameters to your Templates without making use of Extensions by attaching them to your Page's URL as follows: 
 
http://www.example.com/site/page/:parameter1:parameter2
 
These parameters will be passed through to your Templates as an array $untitledparams:
  1. Array(
  2.     [0] => 'parameter1'                 string First parameter value
  3.     [1] => 'parameter2'                 string Second parameter value
  4. )

$approot

$approot contains the path on the filesystem to the base directory of the yeager installation.
  1. /var/www/httpdocs/yeager