A integration of template renderer into symfony via smarty template engine.

0.1.0 2022-09-17 15:53 UTC

This package is not auto-updated.

Last update: 2022-11-15 21:55:33 UTC


Integrate the templating Smarty Adapter into the Symfony Framework.

Part of the Schranz Templating Project.


Install this package via Composer:

composer require schranz-templating/symfony-smarty-integration

Register the Bundle class in your config/bundles.php or Kernel file:

return [
    // ...
    Schranz\Templating\Integration\Symfony\Smarty\SchranzTemplatingMustacheBundle::class => ['all' => true],


The Smarty Integration has the following configuration available:

    default_path: '%kernel.project_dir%/templates'
    cache: '%kernel.cache_dir%/smarty'

None of the configuration is required.


type: string default: '%kernel.project_dir%/templates'

The path to the directory where Symfony will look for the application Smarty templates by default.


type: string default: '%kernel.cache_dir%/smarty'

Before using the Smarty templates to render some contents, they are compiled into regular PHP code. Compilation is a costly process, so the result is cached in the directory defined by this configuration option.