Theme Engine Documentation

What variables are available in layouts?

Inside all layouts you may use smarty-like tags that produce content. Some tags produce areas for placing modules, others produce output that only designer can specify.

Areas for Modules

Anywhere in the layout file you can use these variables (* means your entered ID):

{master.*}

This creates an area to place some master content - the same module will be visible across all pages whose layouts have an area with the same name. These areas are created for such elements as logo, menu, sidebar, etc. You cannot place stand-alone modules that require access to the URL, e.g. database, in master areas.

To keep modules in place when changing your site's theme, we standardized master areas' names across our free themes: {$master.logo}, {$master.menu}, {$master.top1}, {$master.banner1}, {$master.sidebar1}, {$master.footer1}, {$master.copyright}. Some themes require more than 1 master area in those zones, so several are placed increasing the digit in the name by 1.

{content.*}

These areas work similar as master areas, but their content is unique for every page. They are created for the main content of the page, so you can place any modules in them.

We recommend using standard area names the same way as with master areas: {$content.banner1}, {$content.sidebar1}, {$content.main1}, {$content.footer1}.

Layout-Specified Output

There are also several variables that produce static output that cannot be modified by the website administrator. If some elements will not change for sure (e.g. company logo is embedded in the design), place them directly in your layout code rather than through areas - content writers won’t need to work with them. For hard-coded elements use these static output variables:

{home}

Produces a URL to your homepage in correct language. If you have any hard-coded elements (Copyright, Logo, etc.), use this variable instead of a hard-coded URL, because URLs are different in different languages and the administration.

{path}

Produces a full path with a trailing slash to your theme's directory. Your static files (CSS, images, flash, etc.) are stored in the global Content Delivery Network under changing addresses far from your code, so this is the only way to access them. However, normally you should access all images, fonts, etc. from your CSS, not layouts, so you should need this variable in very special cases only.

{locale}

Produces an iso-code of the current locale, identical to the page address prefix visible in the URL. You can use it for CSS classes selection if needed.

{title}

Produces the title of the website from the locale settings.

{page}

Produces the user-set URI from the current page settings.

{module.*}

Places an inline module with no wrapper. Only modules that require no configuration and accept no user input are allowed, e.g. menu, language selector, etc. * denotes a case sensitive module name. The list of modules varies on different clusters, please ask your administrator for the list of available modules.

Example of using static output variables:

  1. <a href="{home}">
  2.     <img src="{path}logo-{locale}.png" alt="{title}" />
  3. </a>

This would produce a graphical language-adapted logo with a proper alt setting for SEO and a hyperlink to the homepage.