Variables

You can use these variables initiated by Saurus CMS in your templates:

Important stuff   Format Since
{$id} Unique identifier of "active" object. Equals to the value of "id" parameter in URL. int  
{$current_level}

Current level in site sections hierarchy. This counts only sections, not all object classes. 

int  
{$current_class}

Class name of current object, on of the following: "section, article, link, image, comment, poll, document, article's list, link list, login-box, subject, album, iframe-box, asset".

string  

Site description and meta info

   
{$meta_title} Site title which user can define in Properties > Site properties. Before version 4.5.0 use {$title} instead.
string 4.5.0
{$meta_description} Meta description which user can define in Properties > Site properties. string  
{$meta_keywords} Meta keywords which user can define in Properties > Site properties. string  
{$site_name} User can define this in Properties > Site properties. string 4.5.0
{$site_slogan}

User can define this in Properties > Site properties.

string 4.5.0

Site definition, glossary

   
{$glossary}   string 4.6.4
{$encoding} HTML encoding of the website. string  
{$locale}   string 4.6.4
{$site_extension}

 

  4.6.4
Template and extension     
{$tpl} ID of current page template. int  
{$page_tpl} Name of current page template. string  
{$c_tpl} ID of current content template. int  
{$content_tpl} Name of current content template. string  
{$template->id} ID of the current template. This variable is usually called by the template file itself. int 4.5.0
{$template->title}{$template->name} Name of the current template.   4.5.0
{$template->op} "op" value of current template. You can display specific template by using it's "op" value in URL. For example, sitemap in Saurus CMS is usually displayed by ?op=sitemap. string 4.5.0
{$template->extension} Name of the extension which defines current template. string 4.5.0
{$<extension name>}

Array of current extension's configuration data. Eg variable {$saurus4} contains all information from file "extensions/saurus4/extension.config.php"

   
User      
{$user} Equals 1 if user is logged in. boolean  
{$userdata->all.<field>} Enables to access current user's data. Eg {$userdata->all.email}.    
{$in_editor}

Equals 1 if user is in editor's environment.

boolean 4.0.15
Other      
{$url} Part of the URL after hostname. string  
{$hostname} Website's hostname, eg "www.yoursite.com". string  
{$wwwroot} Web root folder, eg "/". string  
{$protocol} Site protocol set in site configuration settings. Default value is "http://" string  
{$op} Value of "op" parameter in the URL. string  
{$self}

Name of current script, used in form actions. Eg "index.php".

string  
Deprecated variables    
{$lang}
Abbreviation of current website language, eg "en" or "jp". From version 4.6.4, use {$site_extension} instead. string  
{$admin} Equals 1 if site editor is logged in. In version 4, use {$in_editor} and {$user} tags instead. boolean