Dwoo is a PHP based templating engine aimed as a replacement for Smarty 2.x using similar and alternative syntax. CodeIgniter-Dwoo is a simple implementation for using Dwoo in your CodeIgniter view files.
- PHP 5.2+
- CodeIgniter 1.6.x - 2.0-dev
- Dwoo 1.2-dev (grab a copy from GitHub)
Requirements for Dwoo alone are:
- SPL and PCRE extensions (for php versions prior to 5.3.0)
- mbstring extension for some string manipulation plugins (especially if you intend to use UTF-8)
Download Dwoo and copy the main /dwoo/ folder into your application/libraries/ folder.
Copy libraries/MY_Parser.php to your application/libraries/ folder.
Copy config/parser.php to your application/config/ folder.
Create the folders:
application/cache application/cache/dwoo application/cache/dwoo/compiled
Set the new folders file permissions to be write-able:
chmod -R 777 application/cache
$this->load->library('parser'); $this->parser->parse('dwoo_test', array('message' => 'OH HAI!'));