The easiest Template Engine for PHP
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cache Update gitignore in cache Feb 9, 2012
library/Rain update to MIT licence (pending review by @feulf to become binding) (#187 Jun 8, 2018
templates update to MIT licence (pending review by @feulf to become binding) (#187 Jun 8, 2018
test update to MIT licence (pending review by @feulf to become binding) (#187 Jun 8, 2018
.gitignore update to MIT licence (pending review by @feulf to become binding) (#187 Jun 8, 2018
.travis.yml test against php5.6 as well (#184) Jun 8, 2018
README.md update to MIT licence (pending review by @feulf to become binding) (#187 Jun 8, 2018
composer.json Make the tests pass Dec 23, 2014
composer.lock Make the tests pass Dec 23, 2014
example-all.php fixed style with PHPStorm Oct 31, 2013
example-bootstrap.php fixed style with PHPStorm Oct 31, 2013
example-draw-string.php fixed style with PHPStorm Oct 31, 2013
example-extend-class.php fixed style with PHPStorm Oct 31, 2013
example-multiple-template-directories.php fixed style with PHPStorm Oct 31, 2013
example-nested-loop.php fixed style with PHPStorm Oct 31, 2013
example-plugin-compress.php Update example-plugin-compress.php Dec 15, 2016
example-plugin-img-resize.php fixed style with PHPStorm Oct 31, 2013
example-simple.php fixed style with PHPStorm Oct 31, 2013
example-webpage-new.php fixed style with PHPStorm Oct 31, 2013
example-webpage.php fixed style with PHPStorm Oct 31, 2013
phpunit.xml.dist Installed autoload.php, updated examples and tests Jan 23, 2013

README.md

RainTPL 3

By Federico Ulfo and a lot awesome contributors!

RainTPL is an easy template engine for PHP that enables designers and developers to work better together, it loads HTML template to separate the presentation from the logic.

Features

  • Easy for designers, only 10 tags, {$variable}, {#constant#}, {include}, {loop}, {if}, { comment }, {noparse}, {function}
  • Easy for developers, 5 methods to load and draw templates.
  • Powerful, modifier and operation with variables
  • Extensible, load plugins and register new tags
  • Secure, sandbox with blacklist.

Installation / Usage

  1. Install composer https://github.com/composer/composer

  2. Create a composer.json inside your application folder:

    {
        "require": {
            "rain/raintpl": ">=3.0.0"
        }
    }
  3. Run the following code

    $ php composer.phar install
  4. Run one example of RainTPL with your browser: http://localhost/raintpl3/example.php

Documentation

The documentation of RainTPL is divided in documentation for web designers and documentation for PHP developers.

Licence

RainTPL 3, like its antecessor Rain.TPL version 2, is, as of 2018-06-07, published under the MIT Licence.

The above applies to RainTPL 3 itself, not the entire content of this repository. Some of the example-*.php files and the content below templates/ in this repository are copies of external code under various licences, such as:

  • Twitter Bootstrap, under the Apache v2 licence
  • LESS - Leaner CSS, under the Apache v2 licence

Note that not all external content comes with full source code, it’s usually just a copy of (possibly minified or otherwise modified) parts of their distribution. The example files may be used as starting points without limitation except the licences on the external content.