Languages: English | Italiano
Home | FAQ | Example | Documentation | Download | Benchmark | Contact

Rain TPL
The easy template engine PHP, that compile template.
Open source under GNU GPL license.

Features

 

 

 

 

For any question check the group of raintpl
http://groups.google.com/group/raintpl


RainTpl is part of Rain Framework project.
August 21 2010
Rain Framework 1.0

RainTPL is now part of a bigger open:
Rain Framework, the easy framework php open source.

Rain Framework is a collection of usefull functions and classes to simplify the creation of web project like Cms and Crm, it includes RainTPL, Rain.MySql, Rain.Error and more functions.

Check the project www.rainframework.com

August 18 2010
RainTPL 1.9

Corrected bug in {include} tag of the 1.9 beta version,
Important updates:

  • Added static property raintpl::$base_dir, which set the base directory of all image src attribute,  background attribute and link href attribute.
    You can set $base_dir when you instantiate RainTpl object:

    $tpl = new RainTPL( $tpl_dir = null, $tpl_compile_dir = null, $base_dir = null );

  • Added static property raintpl::$tpl_compile_dir, which define the directory where raintpl save the compiled template. By default is "tmp/", you can set $tpl_compile_dir when you instantiate RainTpl object:

    $tpl = new RainTPL( $tpl_dir = null, $tpl_compile_dir = null, $base_dir = null );

Both $base_dir and $tpl_compiled_dir are static properties of RainTpl class so you can set them just the first time you instantiate the RainTPL object.
$base_dir allow to make easy folder links in Cms that use rewrite rules (ex. /products/category/product), so all the image are with absolute path.

June 23 2010
RainTPL 1.9 beta

After many email requests we decided to anticipate the update of the new version, to solve some problems of the older version.

This is a beta version so we'll wait your feedback to make it definitive.

  • Added RainTPL::tpl_compile_dir, that define cache directory where Rain Tpl save the compiled templates. We toke this solution to solve the write permission problem on some web server. RainTPL::tpl_compile_dir is "tmp/" of default.

    Alert: Rain TPL now save the compiled template in the directory "tmp/"!
  • Removed the credit from compiled template ( <!-- created by Rain TPL ... --> ), to solve problem related to html validation.

  • Improved the source code.

Thanks Sergies for help to find the solution of write permission.

June 14 2010
Documentation in German

Documentation updated and translated in German.
Thanks to Christian Stefan for the translation.

June 14 2010
Website Updated

Restyled the graphics and the documentation to simplify more the navigation.
Thanks to Christian Stefan for graphics restyle and documentation.

June 12 2010
RainTPL 1.7.8
  • When the template directory is not writeable, RainTPL load the default precompiled template template_name.php (before was template_name_def.php).
  • Fixed some minor bug in directory management.
  • Added some security control for xml file and now compiled cannot be executed directly. Thanks to Oliver Illie for the xml security coding.
  • Php comments translated in english.
December 28 2009
RainTPL 1.7.6
  • Fixed bug that caused wrong path replace when template had more images.
December 10 2009
RainTPL 1.7.5
  • Constant DEBUG changed name in RAINTPL_CHACHE_ENABLED. Set true as default to load cached template and improved speed.

Important: filename are now lowercase: rain.tpl.class.php, rain.tpl.compile.class.php

September 01 2009
RainTPL 1.7
  • Is now possible to organize templates in subdirectory, ex:

    TPL_DIR/TPL/news/news.html

    $tpl = new RainTpl( 'TPL_DIR/TPL/' );
    $tpl->draw( 'news/news' );

  • Can be create xml template.
  • $show_copyright parameter added to the RainTPL.compile.class.php, to show/hide comments in compiled templates. Set "false" for XML templates.
  • Ereg function deprecated from PHP 5.3.0, substituted by preg_match. Thanks to Oliver Smith for support.
November 19 2008
RainTPL 1.6 project on sourceforge.net

Released RainTPL version 1.6 online on sourceforge.net.
Updates:

  • added constants:
    {#_CONST_NAME_#}

  • added global vars:
    {$GLOBALS}  {$_GET}  {$_POST}  {$_COOKIES}  {$_SESSION} e {$_SERVER}
  • if cannot compile template, due the permission denied, raintpl load the precompiled one named as: template_name_def.php


The website is now in english version too, and the documentation is updated to the 1.6 version.

August 05 2007
Memht use Raintpl

August 05 2007
Benchmark added

Benchmark of the famouse PHP template engine: benchmark.
Thanks Juozas Salna for the benchmark script!

July 08 2007
RainTPL 1.0

Released the version 1.0 of Rain TPL.

Features

  • Quikly: load precompiled template.
  • Easy: 2 files, 7 tags and 3 methods for design template.
  • Useful: split graphics by contents, manage theme (ex: acid | blue ).
  • WYSIWIG: substitute image and css paths with server paths.

Alert: RainTPL v.1 is not compatible with previous version.

Rain TPL Powered Copyright 2006-2010 Rain TPL
Project By Federico Ulfo . it