Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.03 KB

File metadata and controls

48 lines (36 loc) · 1.03 KB

Schranz Template Renderer Integration for Handlebars

Integrate the templating Handlebars Adapter into the Mezzio Framework.

Part of the Schranz Templating Project.

Installation

Install this package via Composer:

composer require schranz-templating/mezzio-handlebars-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\Handlebars\ConfigProvider::class,
]);

Configuration

The following configuration is available:

// src/App/src/ConfigProvider.php

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