This word that stays for What You See Is What You Get and is probably the best feature of RainTPL. This feature allows you to design HTML templates as static web pages, with images and css, that you can immediately check on your browser.
RainTPL replace for you all the relative paths of your template with the correct server paths.
Example:
The template is page.html and the image is in tpl/img/logo.jpg
Output:
Absolute path and path ending with # (pound sign) are not be replaced.
Example:
<img src="http://www.raincms.com/logo.jpg"/>
Output:
<img src="http://www.raincms.com/logo.jpg"/>
By default, RainTPL replace the relative paths for the tags <img>, <link>, <script>, <input> and <a>. You can set the path_replace_list with the Raintpl::Configure method.
You can also configure the Raintpl::$base_url, which is used as a base of the replacement:
PHP
Template:
Output:
Note: the <a> tag is replaced only if it is configured the Raintpl::$base_url.
