Global template variables¶
These variables are always available for rendering in templates.
The version of Zotonic, for example
An atom with the name of the dispatch rule that was applied to render the current page.
A list containing the request path used as initial input for the dispatcher.
The path is split on
/ and after an optional rewrite. This means that the
list doesn’t contain the language prefix. For example, the path
/en/foo/bar?a=b will give the list
Same as zotonic_dispatch_path, but set to the path after an optional internal
request rewrite inside the dispatcher. For example if a resource has its
page_path set to
/foo and the requested path is
/en/foo then the
zotonic_dispatch_path will be set to
[<<"foo">>] and the
zotonic_dispatch_path_rewrite could be set to something like
[<<"page">>, <<"1234">>, <<"foo-slug">>].
The currently selected language. This an atom, for example:
A key/value list containing the current request’s query variables. For GET requests, these are the arguments passed from the query string (e.g.
?foo=bar); for POST requests, these are also the values posted in the POST form. For more access to the raw request data, look at the m_req model.
The UTC date and time in Erlang tuple notation, for instance
true, false, and undefined¶
undefined are predefined.