Skip to content

Latest commit

 

History

History
74 lines (50 loc) · 1.54 KB

README.md

File metadata and controls

74 lines (50 loc) · 1.54 KB

HandlebarsBundle

This Symfony3 bundle provides integration for the Handlebars template engine using LightnCandy as renderer.

Installation

Prerequisites

  • Symfony3
  • composer

Installation

composer require jays-de/handlebars-bundle dev-master

Composer will install the bundle to your project's `vendor/` directory.

### 2. Enable the bundle

Enable the bundle in the kernel:

``` php
<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new \JaySDe\HandlebarsBundle\HandlebarsBundle();
    );
}

3. Enable the Handlebars template engine in the config

    # app/config/config.yml
    framework:
        templating:      { engines: ['twig', 'handlebars'] }

Documentation

Usage

Files in your Resources/view with a .hbs or .handlebars ending are supported.

public function indexAction(Request $request)
    {
        ...
        return $this->render('index.hbs', [...]);
    }

This will render the file index.hbs in your Resources/views folder.

Authors

Jens Schulze - [email protected]

See also the list of contributors who participated in this project.

Submitting bugs and feature requests

Bugs and feature requests are tracked on GitHub.