O'Reilly logo

Professional Plone Development: Building robust, content-centric web applications with Plone 3, an open source Content Management System by Martin Aspeli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Global Template Variables and Helper Views

You may have noticed a few template variables that we did not define explicitly, such as portal_url or checkPermission. These are global variables (in templates only), pulled into main_template via global_defines. You can see a list of these variables in the docstring for globalize() in the interface Products.CMFPlone. browser.interfaces.IPlone.

Some of these global variables may eventually be deprecated, because they are being calculated on every page whether they are actually used or not. However, a few of the most useful (and least inefficient) ones are:

Global template variable

Purpose

portal

The Plone site root object

portal_url

The URL of the Plone site root

member

The currently authenticated member

checkPermission ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required