Skip to content

RobLoach/templating-smarty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Templating Smarty

Build Status Total Downloads Latest Stable Version

Smarty support for Symfony's Templating component.

Installation

Templating Smarty can be installed with Composer by adding it as a dependency to your project's composer.json file.

{
    "require": {
        "robloach/templating-smarty": "*"
    }
}

Please refer to Composer's documentation for more detailed installation and usage instructions.

Usage

Instantiate the engine:

use RobLoach\TemplatingExtras\SmartyEngine;

$parser = new Symfony\Component\Templating\TemplateNameParser();
$templating = new SmartyEngine($parser, array(
    'template_dir' => '.'
));

echo $templating->render('hello.smarty', array('firstname' => 'Fabien'));

hello.smarty

Hello, {$firstname}!

See Symfony's documentation on Templating for more information about using the different template engines available.

Releases

No releases published

Packages

No packages published

Languages