-
Notifications
You must be signed in to change notification settings - Fork 1
Available variables in template
Lucas Verney edited this page Aug 23, 2014
·
3 revisions
Here is a list of the available variables to be used in templates.
-
$start_generation_time
is the timestamp of the beginning of the page generation (float). -
$feed_baselink
is the baselink to be used for feeds links (to take into account the fact that URL rewriting may or may not be enabled). -
$tag_baselink
is the same thing as$feed_baselink
but for tags. -
$user
is eitherfalse
if the user is not connected or astdClass
with the fieldsid,
login,
salt,
remember_tokenand
is_admin(meaning you can access them with
$user->idand so on). Please note that you SHOULD NOT use
saltand
remember_token` as these are only used in the backend.
-
$view
is the expression of the current view (for instance$tag_TAG
). -
$entries
is the array of entries matching the current view. -
$feeds
is an array containing all the feeds.
-
$error
is an array{'type', 'title', 'content'}
containing the last encountered error.content
is a HTML formatted content (paragraphs in most cases).