Skip to content

welikeideas/HandlebarsBundle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 90.8%
  • HTML 9.2%