Variable example
Variable example
variable HelloVariable assignment
assignment and print 10Variable Modifiers
5Hello
Global variables
The variable is declared as global into the PHP I'm GlobalShow all declared variables
To show all declared variable use.Array ( [variable] => Hello [version] => 3.0 Alpha [menu] => Array ( [0] => Array ( [name] => Home [link] => index.php [selected] => 1 ) [1] => Array ( [name] => FAQ [link] => index.php/FAQ/ [selected] => ) [2] => Array ( [name] => Documentation [link] => index.php/doc/ [selected] => ) ) [week] => Array ( [0] => Monday [1] => Tuesday [2] => Wednesday [3] => Thursday [4] => Friday [5] => Saturday [6] => Sunday ) [title] => Rain TPL 3 - Easy and Fast template engine [user] => Array ( [0] => Array ( [name] => Fede [color] => blue ) [1] => Array ( [name] => Sheska [color] => red ) [2] => Array ( [name] => Who [color] => yellow ) ) [empty_array] => Array ( ) [copyright] => Copyright 2006 - 2012 Rain TPL
Project By Rain Team ) 1
Constants
Constant
Constant: 1Modier on constant as follow
1Loop example
Simple loop example
- 0 = Monday
- 1 = Tuesday
- 2 = Wednesday
- 3 = Thursday
- 4 = Friday
- 5 = Saturday
- 6 = Sunday
Loop example with associative array
- ID _ Name _ Color
- 0) - FEDE - blue
- 1) - SHESKA - red
- 2) - WHO - yellow
Loop an empty array
-
The array is empty
If Example
simple if example
OK!example of if, elseif, else example
First character of variable is not A neither BCustom function
Translate: Array
Path Replace (WYSIWYG)
WYSIWYG
RainTPL replaces relative paths of images, css and links automatically with the correct server paths.Path replace on relative path of image
into the template the image is wrote as:<img src="img/logo.gif" alt="logo"/>
in the compiled template the path is replaced with the correct path tpl/img/logo.gif:Absolute paths and path ending with # are not replaced
For more info read the documentation: http://www.raintpl.com/Documentation/Documentation-for-web-designers/WYSIWYG/