Important Variables

CMSimple allows you to output the contents of system variables used in template.htm, such as language or path variables.

Language variables

All available language variables can be found in the corresponding language file.
For the german language that would be in the file de.php:

./cmsimple/languages/de.php

The following example shows how you can output a language variable inside template.htm:

<?php echo $tx['locator']['text']; ?>

Output: "Sie sind hier: "

Example of how to use:

<b><?php echo $tx['locator']['text']; ?>  </b>
<?php echo locator();?>

In the language file there are special variables that are template bound:

$tx['template']['text1']
...
$tx['template']['text9']

Variables 1-3 are system reserved, 4-9 are free to use.

Path variables

The most important path variables:


Output: path to the root templates folder /templates/, with ending trailing slash.


Output: path to the folder of the template, with ending trailing slash.


Output: path to the templates images folder /images/, with ending trailing slash.


Example of how to use:

<a href="./">
<img src="<?php echo $pth['folder']['templateimages'];?>logo.jpg" class="logo" alt="Logo">
</a>

Other variables

Other interesting system variables that are available for use in template.htm:


Output: the language code.
For german the output would be: "de"

Example of how to use:

<html lang="<?php echo $sl;?>">

Result: <html lang="de">


Output: the path from the domain root to the CMSimple root, with ending trailing slash.