ez.no / exponential / documentation / reference / template functions / miscellaneous / include
{include uri="path_to_file" [ name='namespace' ] [ parameter(s)='value(s)' ] }
| Name | Type | Description | Required |
|---|---|---|---|
| uri | string | Path to the included file | Yes. |
| name | string | namespace for the included template | No. |
| other parameters | mixed | Parameters passed to the included template | No. |
Includes a file in this template. The uri parameter specifies the file to be included. The name parameter specifies the namespace for the included template, this is useful for avoiding variable name clashes with included files. All other parameters are passed to the included template as template variables in the new namespace. This makes it possible to share template code among different pages or create GUI components by passing variables to the included template. A typical usage is to include another template file located under design folder by specify uri="design:path_to_file".
Includes file edit_validation.tpl which located in folder design/mydesign/templates/content into the current template. If the file is not located under design/mydesign, then the file design/standard/content/edit_validation.tpl will be included. Here we assum that the current file belongs to design/mydesign.
{include uri="design:content/edit_validation.tpl"}
Includes file google.tpl and pass different parameter to that template.
{include name=navigator uri='design:navigator/google.tpl' page_uri=concat('/content/view','/full/',$node.node_id) item_count=50 view_parameters=$view_parameters item_limit=10}
log in or create a user account to comment.
Comments