OPT for Kohana Framework
From Invenzzia wiki
| OPT module for KohanaPHP | |
| Project | Open Power Template 2 |
| Type | Framework Port |
| Author | Damian Nowak |
| Website | http://www.kohanaphp.com.pl/ |
| License | New BSD License |
| Status | No information |
An Open Power Template module for KohanaPHP 2.2/2.3 framework. This module extends the View class so that OPT engine renders the view.
Module is available for download here: www.kohanaphp.com.pl
Installation
- Extract the archive into your modules path.
- Add new module to
config/config.php. - Copy
config/view.phpfrom the module to your application configuration directory, ifview.phpexists in your application config directory. - (optionally) Configure OPT template extension.
Example
$view = new View('template.tpl');
$view->dynamic = 'Dynamic content';
$view->render(TRUE);
This will be rendered by OPT engine.
Note, you must provide a view name with the OPT extension. This is the way the extension decides whether to use either OPT or the native Kohana view library.
Known issues
Do not set OPT extension to XML. This prevents the template from being processed. It may be fixed in future.

