Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 1.07 KB

README.md

File metadata and controls

49 lines (37 loc) · 1.07 KB

Schranz Template Renderer Integration for Smarty

Integrate the templating Smarty Adapter into the Mezzio Framework.

Part of the Schranz Templating Project.

Installation

Install this package via Composer:

composer require schranz-templating/mezzio-smarty-integration

Register the ConfigProvider class in your config/config.php if not already automatically added by the framework:

// ...

$aggregator = new ConfigAggregator([
    // ...
    \Schranz\Templating\Integration\Mezzio\Smarty\ConfigProvider::class,
]);

Configuration

The following configuration is available:

// src/App/src/ConfigProvider.php

class ConfigProvider
{
    public function __invoke(): array
    {
        return [
            // ...
            'smarty' => [
                'paths' => ['src/App/templates'],
                'cache_dir' => 'data/cache/smarty/cache',
                'compile_dir' => 'data/cache/smarty/compile',
            ],
        ];
    }
}