PHPackages                             alemachado/template-twig - 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. alemachado/template-twig

ActivePw-module[Templating &amp; Views](/categories/templating)

alemachado/template-twig
========================

Adds a Twig render method to Page

02PHP

Since Mar 26Pushed 11y ago1 watchersCompare

[ Source](https://github.com/alemachado/TemplateTwig)[ Packagist](https://packagist.org/packages/alemachado/template-twig)[ RSS](/packages/alemachado-template-twig/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

TemplateTwig
============

[](#templatetwig)

Adds a Twig render method to Page
For more information on Twig visit
Copyright (C) 2012 by Paul Sheean
Licensed under GNU/GPL v2, see LICENSE.txt
For Twig license see LICENSE.twig.txt

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

[](#installation)

- Copy `TemplateTwig` directory to `site/modules`
- Enable `TemplateTwig` module in ProcessWire
- Ensure module configuration (paths etc) is correct.
- Your templates now have access to a twig parameter that can be used as follows:

    ```
      $variables = array("foo" => "bar", "hello" => "world);
      echo $page->twig->render('basic-page.html.twig', $variables);

    ```

    The `templates` directory with this module contains sample Twig templates and views
    that recreate the standard site-default templates with Twig. If you don't want to use
    them then just create the `templates/views` directory and use the files from here
    as a guide to make your own.
- Create pages that use the twig templates.
    **NOTE:** As Twig handles html escaping etc itself, you can usually remove any *htmlspecialchars* filters from your fields. If you don't do this you may run into double-escaping issues.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.4% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5731003c511784a7dc0fb9c03445a1ef8fa3c9e1e813bfd3fb5f1a694562d617?d=identicon)[alemachado](/maintainers/alemachado)

---

Top Contributors

[![porl](https://avatars.githubusercontent.com/u/1229507?v=4)](https://github.com/porl "porl (38 commits)")[![alemachado](https://avatars.githubusercontent.com/u/1666449?v=4)](https://github.com/alemachado "alemachado (4 commits)")[![mbirth](https://avatars.githubusercontent.com/u/130302?v=4)](https://github.com/mbirth "mbirth (1 commits)")

### Embed Badge

![Health badge](/badges/alemachado-template-twig/health.svg)

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

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

555.8M69](/packages/symfony-ux-icons)

PHPackages © 2026

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