Docs: Master Template
Show AllHide All
-
Main Page
- About
-
About
- Development
-
Code Library
Databases
- Extensions
-
Examples
Snippets
Redirects
Custom head
Introduction
- Templates
-
Skins
Smart Tags
Body Tag Classes
Master Template
- Variables
-
Language
Session Variables
Page Variables
add page
Last update: Databases
by Sean on Tuesday 12th of July
at 04:05pm
The master template is an HTML header/footer wrapping all pages. You can make exceptions with Skins giving pages or sections their own template.
The master template utilizes the symbolic link /template/ so an image path may be:
<img src="/template/image.jpg" />
The template files are located in /templates/
If the current template has a template_id of 2 then the files will be located in /templates/2 so they can also be specified precisely:
<img src="/templates/2/image.jpg" />
The master template, like all templates, uses Smart Tags to display HTML that is dynamic. For example, you wouldn't want to manually add the link to your template every time you added a category. The Smart Tag {$LINKS_CATEGORY} handles this by generating the list of category links for you on-the-fly. Simply add the Smart Tag {$LINKS_CATEGORY} somewhere in your header or footer and it will output an unordered list of links.
As a rule, the HTML that is outputted is consistent with other Smart Tags in format, URI structure and the naming conventions of IDs and class names. So the {$LINKS_CATEGORY} tag will output:
<div class="links-category">
<ul>
<li class="link-shoes first"><a href="/shop/shoes">Shoes</a></li>
<li class="link-t-shirts current"><a href="/shop/t-shirts">T Shirts</a></li>
<li class="link-socks"><a href="/shop/socks">Socks</a></li>
etc...
</ul>
</div>
Revisions history (6) ( hide | show ) Templates > Master Template