Home > Theme Design > Variable (tag) 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>

subscription_tag  

If you want your visitors to be able to subscribe for page content email notifications, then use the subscription_tag function.

Example usage:

{{ page | subscription_tag }}
subscribe for this page
{{ page | subscription_tag_end }}

search_tag  

Use search_tag where you want to place a search box.

Example usage:

{{ "search in this site" | search_tag }}

 

file_explorer_navigation  

Use file_explorer_navigation where you want to place a folder explorer looking page sub-tree, by passing the root page id.

Example usage:

{{ 724 | file_explorer_navigation }}

 

Example - root page title is "Files":

http://wiki.metadot.net/__metadot__/image_library/get_image/96144/folder_browsing.jpg

open_send_this_page_to_a_friend  

Generates a hot link around the selected html code, by clicking on which a popup window will open with form to be filled and send to an email with a link to the current page.

Example usage:

{{ page | open_send_this_page_to_a_friend }}<img src="{{ 'SaveThisPage.jpg' | asset }}" alt="Send This Page to a Friend">{{ page | close_send_this_page_to_a_friend }}