PHPackages                             roxburghm/twig-hhandlebars - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. roxburghm/twig-hhandlebars

ActiveLibrary[Templating &amp; Views](/categories/templating)

roxburghm/twig-hhandlebars
==========================

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

2.3.2(8y ago)0141MITPHPPHP &gt;=5.6

Since Jan 9Pushed 8y ago1 watchersCompare

[ Source](https://github.com/roxburghm/twig-hhandlebars)[ Packagist](https://packagist.org/packages/roxburghm/twig-hhandlebars)[ RSS](/packages/roxburghm-twig-hhandlebars/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (3)Versions (11)Used By (0)

Twig H-Handlebars
=================

[](#twig-h-handlebars)

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

This Twig Preprocessor, heavily based on \[\] allows you to use {{{ }}} handlebars in a twig template which are rendered out in the final twig as {{ '{{' }} and {{ '}}' }}.

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

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

Installation
------------

[](#installation)

Installation via composer (version for twig 2):

```
composer install roxburghm/twig-hhandlebars

```

Usage
-----

[](#usage)

Intantiate a real template loader and then wrap that in a HHandlebars loader before passing to Twig.

Intantiate Twig

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

Template Usage

```
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.

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.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~84 days

Recently: every ~105 days

Total

6

Last Release

3033d ago

Major Versions

1.0.0 → 2.1.02018-03-04

PHP version history (3 changes)2.0.0PHP &gt;=7.0

1.0.0PHP &gt;=5.2.7

2.1.0PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/03f27b7cca8b1fbe60aabf39b33bf82f452f3253c4a7fb77e12c5d93cfc9fb83?d=identicon)[roxburghm](/maintainers/roxburghm)

---

Top Contributors

[![TiGR](https://avatars.githubusercontent.com/u/281226?v=4)](https://github.com/TiGR "TiGR (12 commits)")[![roxburghm](https://avatars.githubusercontent.com/u/8364818?v=4)](https://github.com/roxburghm "roxburghm (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/roxburghm-twig-hhandlebars/health.svg)

```
[![Health](https://phpackages.com/badges/roxburghm-twig-hhandlebars/health.svg)](https://phpackages.com/packages/roxburghm-twig-hhandlebars)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
