Invenzzia »

OPT for Kohana Framework

From Invenzzia wiki

Jump to: navigation, search
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

  1. Extract the archive into your modules path.
  2. Add new module to config/config.php.
  3. Copy config/view.php from the module to your application configuration directory, if view.php exists in your application config directory.
  4. (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.

Personal tools