PHP/JavaScript environment variables

These variables contain information about the current request and Zenario status.

You can access them from PHP code using syntax in the form:

ze::$variableName

Where noted, you can also access some of them from JavaScript code using syntax in the form:

zenario.variableName

 

ze::$adminId

When Zenario is running in admin mode, this holds the id of the administrator who is currently logged in.

ze::$adminVersion

This contains the latest version of a content item - i.e. the version that an administrator would see.

ze::$alias

The alias (or friendly name) of the current content item.

ze::$cID

The id of the current content item.

ze::$cType

The type of the current content item, e.g. documenthtmlpicture...

ze::$cVersion

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.

ze::$equivId

The equivalence id of the current content item.

ze::$isDraft

This will be set to true when an administrator is looking at a draft version of a content item.

ze::$langId

The language id for the current content item.

ze::$layoutId

The id of the layout that the current content item is using.

ze::$locked

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.

ze::$skinId

The id of the skin that the current content item is using.

ze::$status

The status of the current content item, i.e. "first_draft", "published_with_draft", "hidden_with_draft", "trashed_with_draft", "published", "hidden" or "trashed".

ze::$userId

When a visitor has created a user account and has logged into the site, this will hold their user id.

ze::$visitorVersion

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.