PHPackages                             wieni/wmtwig - 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. wieni/wmtwig

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

wieni/wmtwig
============

Improves the integration of Twig with component and entity-oriented projects

1.0.2(1y ago)02.7k—0%2[2 issues](https://github.com/wieni/wmtwig/issues)2MITPHPPHP ^8.0

Since Jun 28Pushed 1y ago2 watchersCompare

[ Source](https://github.com/wieni/wmtwig)[ Packagist](https://packagist.org/packages/wieni/wmtwig)[ RSS](/packages/wieni-wmtwig/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (8)Used By (2)

Wieni Twig
==========

[](#wieni-twig)

[![Latest Stable Version](https://camo.githubusercontent.com/05d4969fe1836ed44ac6e1f712b848b30432bf71407d799bf2adb0271788332c/68747470733a2f2f706f7365722e707567782e6f72672f7769656e692f776d747769672f762f737461626c65)](https://packagist.org/packages/wieni/wmtwig)[![Total Downloads](https://camo.githubusercontent.com/1bd47c079ba291d0b90ee32fee6dfbceadc06e8c64830911058714062b24d5fc/68747470733a2f2f706f7365722e707567782e6f72672f7769656e692f776d747769672f646f776e6c6f616473)](https://packagist.org/packages/wieni/wmtwig)[![License](https://camo.githubusercontent.com/e303af91b41759f90f98bb23b00d10d032dcf41f15959a9b7d9f44650a451b47/68747470733a2f2f706f7365722e707567782e6f72672f7769656e692f776d747769672f6c6963656e7365)](https://packagist.org/packages/wieni/wmtwig)

> Improves the integration of Twig with component and entity-oriented projects.

Why?
----

[](#why)

*TODO*

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

[](#installation)

This package requires PHP 7.1 and Drupal 8 or higher. It can be installed using Composer:

```
 composer require wieni/wmtwig
```

How does it work?
-----------------

[](#how-does-it-work)

### Registering Twig templates as theme implementations

[](#registering-twig-templates-as-theme-implementations)

This module automatically registers your Twig templates as theme implementations. Modules and themes can indicate in their info.yml file which paths should be included:

```
name: Some theme
type: theme

wmtwig:
    templates: pages
```

If the module or theme has multiple paths, an array can be passed:

```
name: Some theme
type: theme

wmtwig:
    templates:
        - components
        - pages
```

The advantage against the default way of rendering Twig templates ([see documentation](https://www.drupal.org/docs/theming-drupal/twig-in-drupal/create-custom-twig-templates-for-custom-module)) is that you don't have to manually define every template in a theme hook. Also, the folder structure of your templates is respected. This makes it possible to refer to templates in the same way as in Laravel projects, eg. `node.product` for the `node/product.html.twig` template.

It is recommended to not use the default `templates` folder for these templates, because they might clash with other Drupal theme implementations. Eg. when creating a template at path `templates/node/page.html.twig`, it will override the core page template.

Changelog
---------

[](#changelog)

All notable changes to this project will be documented in the [CHANGELOG](CHANGELOG.md) file.

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

Distributed under the MIT License. See the [LICENSE](LICENSE) file for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~194 days

Total

5

Last Release

634d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/734199ae17f8da336fef9ba81f7c37cda09b0f9a952f551235c32ecfad68488b?d=identicon)[Wieni](/maintainers/Wieni)

---

Top Contributors

[![DieterHolvoet](https://avatars.githubusercontent.com/u/3606531?v=4)](https://github.com/DieterHolvoet "DieterHolvoet (78 commits)")[![RobinHoutevelts](https://avatars.githubusercontent.com/u/9056689?v=4)](https://github.com/RobinHoutevelts "RobinHoutevelts (72 commits)")[![frizinak](https://avatars.githubusercontent.com/u/823696?v=4)](https://github.com/frizinak "frizinak (61 commits)")[![akasake](https://avatars.githubusercontent.com/u/32063989?v=4)](https://github.com/akasake "akasake (3 commits)")[![jelteliekens](https://avatars.githubusercontent.com/u/3418474?v=4)](https://github.com/jelteliekens "jelteliekens (1 commits)")

---

Tags

drupal-8drupal-9drupal-moduletwig

### Embed Badge

![Health badge](/badges/wieni-wmtwig/health.svg)

```
[![Health](https://phpackages.com/badges/wieni-wmtwig/health.svg)](https://phpackages.com/packages/wieni-wmtwig)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[nystudio107/craft-twigpack

Twigpack is a bridge between Twig and webpack, with manifest.json &amp; webpack-dev-server HMR support

97341.4k17](/packages/nystudio107-craft-twigpack)[localgovdrupal/localgov_base

The base theme for LocalGov Drupal websites.

13121.5k4](/packages/localgovdrupal-localgov-base)

PHPackages © 2026

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