Global Template Variables
Plone defines a few useful global variables to use them in your templates
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:
- portal
- The portal object.
- portal_url
- The url of the portal.
- member
- The current user (
Noneif user is anonymous) - checkPermission
- A function to check if the current user has a certain permission in the current context, e.g.
checkPermission('View portal content', context). - isAnon
- True if the current user is not logged in.
- is_editable
- True if the current user has edit permissions in the context.
- default_language
- The default language of the portal.
- here_url
- 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.
Can this list be expanded and moved to its own documentation section?
Instead I want something linked in the Top Navigation of Plone directing me to a page that links to a nicely formatted HTML document that Google picks up. I would be willing to contribute on such a page but would need guidance.