Skip to content

jaxon-php/jaxon-smarty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jaxon View for Smarty

Render Smarty templates in Jaxon applications.

Installation

Install this package with Composer.

"require": {
    "jaxon-php/jaxon-smarty": "~2.0"
}

Usage

Foreach directory containing Smarty templates, add an entry to the app.views section in the configuration.

    'app' => array(
        'views' => array(
            'demo' => array(
                'directory' => '/path/to/demo/views',
                'extension' => '.tpl',
                'renderer' => 'smarty',
            ),
        ),
    ),

In the application classes, this is how to render a view in this directory.

    $this->view()->render('demo::/sub/dir/file');

Read the documentation to learn more about views in Jaxon applications.