Home > Site management > Themes > Variable reference > Functions
login

© Metadot Corporation

js_and_css  

generates all needed javascript and css tags. Accept page as parameter. Must be present in the template header.

Example usage:

<head>
...
{{page | js_and_css}}
...
</head>

body_attrs  

generates some onclick and onmousemove handlers, needed for the gizmo context menus. Accept page as parameter. Must be present in the template body tag.

Example usage:

<body {{page | body_attrs}}>

edit_bar  

Generates the edit bar for the current page. Must be present in the template body. Accept a page as parameter.

Example usage:

<body {{page | body_attrs}}>
{{page | edit_bar }}
...
</body>

gizmo_area  

Generates a gizmo area. Must be in the template body. Accept the number of the area as parameter.

Example usage:

<body {{page | body_attrs}}>
...
{{1 | gizmo_area}}
...
</body>

asset  

Returns the url path to the theme assets. Accept file name as parameter.

Example usage:

{{ 'common.js' | asset }}

stylesheet  

Generates stylesheet tag. Accept asset file name as parameter.

Example usage:

{{ 'textile.css' | stylesheet }}

javascript  

Generates javascript tag. Accept asset file name as parameter.

Example usage:

{{ 'common.js' | javascript }}

image  

Generates image tag. Accept asset file name as parameter.

Example usage:

{{ 'some_image.jpg' | image }}

lt  

Replace the default item separator with the '<' symbol

Example usage: 

{{ page.breadcrumb | lt }}

gt  

Replace the default item separator with the '>' symbol

Example usage:

{{ page.breadcrumb | gt }}

message  

Add message container to the page, where the system messages will appear. Accept as parameter a style string containing style of the message text.

Example message:

{{ '' | message}}

page.load_gizmos  

Load gizmos html content in the page gizmo areas. Should be present in each layout.

Example usage:

...
{{page.load_gizmos}}
</body>
</html>