These variables contain information about the Zenario content item being served, the identity of who's logged in, and other environment variables.
You can access them from PHP code (in a module) using syntax of the form:
ze::$variableName
Most can also be accessed from JavaScript code, see the individual description pages. They can be accessed using the following syntax:
zenario.variableName
To show content item ID and type variables in JavaScript, write this in a Raw HTML/JavaScript snippet plugin, or in JavaScript applied to content items, layouts, or site-wide:
console.log(zenario.cID);
console.log(zenario.cType);
This example should display the currently viewed content item's ID and type in the browser's console.
Environment variables are defined in zenario/basicheader.inc.php and may be populated in the autoload classes, as well as zenario/js/visitor.js file
When Zenario is running in admin mode, this holds the id of the administrator who is currently logged in.
This contains the latest version of a content item - i.e. the version that an administrator would see.
The alias (or friendly name) of the current content item.
The id of the current content item.
The type of the current content item, e.g. document
, html
, picture
...
When an admin or a visitor is looking at a content item, this contains the version of a content item which is currently in view.
In visitor mode this will always be equal to the ze::$visitorVersion variable.
The equivalence id of the current content item.
This will be set to true when an administrator is looking at a draft version of a content item.
The language id for the current content item.
The id of the layout that the current content item is using.
This will be set to true in admin mode when an administrator is viewing a content item that has been checked out by another administrator.
The id of the skin that the current content item is using.
The status of the current content item, i.e. "first_draft", "published_with_draft", "hidden_with_draft", "trashed_with_draft", "published", "hidden" or "trashed".
When a visitor has created a user account and has logged into the site, this will hold their user id.
This contains the published version of a content item - i.e. the version that a visitor would see.
Note that if a content item is not published it will not have a visitor version.