Global Template Variables

Plone defines a few useful global variables to use them in your templates

Note: This page covers the methods for referencing variables for Plone 3. It has changed slightly for Plone 4 (see

While writing templates for Plone, you will notice a set of variables you use more often, like the URL of the portal or the currently authenticated member.

For your convenience, Plone defines a few global template variables that are pulled into main_template via global_defines. Some of the most useful ones are:

The portal object.
The url of the portal.
The current user (None if user is anonymous)
A function to check if the current user has a certain permission in the current context, e.g. checkPermission('View portal content', context).
True if the current user is not logged in.
True if the current user has edit permissions in the context.
The default language of the portal.
The URL of the current object.

To see the full list list of these variables, see the docstring for ``globalize()` in the interface Products.CMFPlone.browser.interfaces.IPlone <>`_.