Place a variable in HTML template {var_name}. To see all available variables, use {template_infos}
<h1>{title}</h1> <p>{txt}</p>
<h1>Contact page</h1> <p>Contact us!<br/>Tel: 1-888-123-4567</p>
Check if a variable is empty before display. To see all available variables, use {template_infos}
{if:tel}<p>Tel: {tel}</p>{/if}
<p>Tel: 1-888-123-4567</p>
Check if a variable is empty before display and display otherwise content. To see all available variables, use {template_infos}
{if:search_result} <p> <h1>Results found</h1> {search_result} </p> {then} <p>No results</p> {/if}
<p> <h1>Results found</h1> 1- Contact page<br/> 2- Contact form </p>Then result
<p>No results</p>
Iterate in a list values (array), dataset objects. To see all available variables, use {template_infos}
{list:people} <p> <h2>{name}</h2> <br/>{address} {if:tel}<br/>Telephone: {tel}{/if} </p> {/list}
<p> <h2>John Smith</h2> <br/>11 Hollywood Street <br/>Telephone: 1-551-123-4567 </p> <p> <h2>Jane Smith</h2> <br/>13 Hollywood Street </p>
Call a custom function or class method and display what it returns.
{call:hello_world:Goodbye}
Goodbye <!-- where the function "hello_world($params[])" returns the first passed param -->
Contains a string that represents the current base url, including the protocol and the trailing slash "/", but not the file nor the query string. Tip, use {WS_URL}{WS_REQUEST} to get the complete request string.".
{WS_URL}
http://webstudiodev.com/
Contains a string that represents the current request, including the query string, but not the domain. Tip, use {WS_URL}{WS_REQUEST} to get the complete request string.
{WS_REQUEST}
index.php?id=1
Display all available variables, arrays and datasets
{template_infos}
Display different text / html for different languages
{lang: |fr| <h1>Bonjour!</h1> |en| <h1>Hello!</h1> }
<h1>Hello!</h1> <!-- When language is "en" (english) -->
Variable that contains the current language code
<a href="/{lang}/index.html"> {lang: |fr| Accueil |en| Home } </a>
<a href="/fr/index.html">Accueil</a> <!-- Where lang is set to "fr" -->
Variable that has the name of the current language.
{if:en}This is english{/if}
This is english <!-- Where lang is set to "en" -->
Random number
<img src="/images/banner_{rand:5}.jpg" />
<img src="/images/banner_4.jpg" /> <!-- Where 4 can be 1 to 5 -->
Make a row appear different than the other
<td class="background_{01}">White Background</td> <td class="background_{01}">Grey background</td> <td class="background_{01}">White Background</td> <td class="background_{01}">Grey background</td>
<td class="background_0">White Background</td> <td class="background_1">Grey background</td> <td class="background_0">White Background</td> <td class="background_1">Grey background</td>
Display CMS content from content module using page ID.
{cms:1}
<h1>Page title</h1> <p>Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit</p>
Display Banner selected from the existing format.
{banner:A}