Templating:Variables

Från Vendre Help
Version från den 27 mars 2011 kl. 14.29 av 79.136.61.42 (Diskussion) (Skapade sidan med 'Category:Templating =Variables= Templates get ==Globals== Globals are accessible anywhere in the templates, including macros. {| class="wikitable" !Variable name!!Description...')
(skillnad) ← Äldre version | Nuvarande version (skillnad) | Nyare version → (skillnad)
Hoppa till: navigering, sök

Variables

Templates get

Globals

Globals are accessible anywhere in the templates, including macros.

Variable name Description
current_page Contains URL after domain name and before ?
current_script Contains filename of current page
request A dictionary of recieved get and post data. { 'get' : get_data, 'post' : post_data}
current_customer_id Returns customer ID if customer is logged in, else None
settings A dictionary of some of the settings defined in the administration

Boxes

Boxes are variables used for the side boxes. They are all prefixed with boxes.

Category box

[
	{
		'name'        : name_of_category,
		'href'        : link_to_category,
		'child_count' : number_of_direct_children,
		'children'    : [ child, ... ],
		'selected'    : is_current_category // Boolean
	},
	...
]
Variable name Description

Page specific

Contact page (contact.html)