2017 © Pedro Peláez
 

library twig-hhandlebars

A twig preprocessing loader that converts {{{ }}} to {{ }} allowing twig template of VueJS etc

image

roxburghm/twig-hhandlebars

A twig preprocessing loader that converts {{{ }}} to {{ }} allowing twig template of VueJS etc

  • Sunday, March 4, 2018
  • by roxburghm
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

Twig H-Handlebars

Pun: H-Handlebars, extra H because of extra curly brace., (*1)

This Twig Preprocessor, heavily based on [https://github.com/TiGR/twig-preprocessor] allows you to use {{{ }}} handlebars in a twig template which are rendered out in the final twig as {{ '{{' }} and {{ '}}' }}., (*2)

This allows you to mix twig and other handlebar delimited code, eg VueJS or handlebars.js, in the same template., (*3)

This branch (master) contains code for Twig 2.x., (*4)

Installation

Installation via composer (version for twig 2):, (*5)

composer install roxburghm/twig-hhandlebars

Usage

Intantiate a real template loader and then wrap that in a HHandlebars loader before passing to Twig., (*6)

Intantiate Twig, (*7)

$realLoader = Twig_Loader_Filesystem('/path/to/templates');
$twig = new Twig_Environment(new Twig_Loader_HHandlebars($loader));

Template Usage, (*8)



Hello {{ twigvar_user.name }}

{{{ message }}}
var app = new Vue({ el: '#app', data: { message: 'Hello Vue!' } })

The code is rendered out correctly without having to resort to changing delimiters anywhere in eithe Twig or, say, VueJS., (*9)

Just in case you like to live dangerously and nest preprocessors in other languages this preprocessor will convert triple handlebars to double as you would expect but ALSO convert quadruple to triple., (*10)

The Versions

04/03 2018

dev-2_3_1

dev-2_3_1

A twig preprocessing loader that converts {{{ }}} to {{ }} allowing twig template of VueJS etc

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Roxburgh

04/03 2018

2.3.2.x-dev

2.3.2.9999999-dev

A twig preprocessing loader that converts {{{ }}} to {{ }} allowing twig template of VueJS etc

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Roxburgh

04/03 2018

2.3.2

2.3.2.0

A twig preprocessing loader that converts {{{ }}} to {{ }} allowing twig template of VueJS etc

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Roxburgh

04/03 2018

dev-2_1_1

dev-2_1_1

A twig preprocessing loader that converts {{{ }}} to {{ }} allowing twig template of VueJS etc

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Roxburgh

04/03 2018

dev-2_1_0

dev-2_1_0

A twig preprocessing loader that converts {{{ }}} to {{ }} allowing twig template of VueJS etc

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Roxburgh

04/03 2018

2.1.0

2.1.0.0

A twig preprocessing loader that converts {{{ }}} to {{ }} allowing twig template of VueJS etc

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Roxburgh

04/03 2018

2.1.1

2.1.1.0

A twig preprocessing loader that converts {{{ }}} to {{ }} allowing twig template of VueJS etc

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Roxburgh

04/03 2018

dev-master

9999999-dev

A twig preprocessing loader that converts {{{ }}} to {{ }} allowing twig template of VueJS etc

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matt Roxburgh

09/01 2017

dev-twig1

dev-twig1

This very simple loader adds a way to pre parse twig files before loading them into twig parser

  Sources   Download

MIT

The Requires

 

The Development Requires

09/01 2017

1.0.0

1.0.0.0

This very simple loader adds a way to pre parse twig files before loading them into twig parser

  Sources   Download

MIT

The Requires

 

The Development Requires

09/01 2017

2.0.0

2.0.0.0

This very simple loader adds a way to pre parse twig files before loading them into twig parser

  Sources   Download

MIT

The Requires

 

The Development Requires