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

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

xaraya/twig
===========

Use Twig template engine with Xaraya

2.9.5(4w ago)01181GPL-2.0-or-laterTwig

Since Mar 29Pushed 4w ago2 watchersCompare

[ Source](https://github.com/xaraya-modules/twig)[ Packagist](https://packagist.org/packages/xaraya/twig)[ Docs](https://github.com/xaraya-modules/twig)[ RSS](/packages/xaraya-twig/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (2)Versions (22)Used By (1)

Use Twig template engine with Xaraya
====================================

[](#use-twig-template-engine-with-xaraya)

Xaraya has been using Blocklayout for templates since the early days. The [Twig bridge](https://github.com/xaraya/core/blob/com.xaraya.core.bermuda/html/lib/xaraya/bridge/README.md#twig-template-engine) included in Xaraya core allows you to use Twig-based templates to generate output in Xaraya if needed, with a number of Xaraya-specific extensions.

This repository contains the Twig templates converted from Blocklayout for different modules, blocks, properties and themes.

Twig Namespaces
---------------

[](#twig-namespaces)

In general `modules` templates are mapped to their equivalent `@modname` namespace. To avoid overlap (with the themes or blocks modules), `themes`, `properties` and `blocks` templates use the singular equivalent `@theme`, `@property` and `@block` namespace.

ComponentNamespaceTemplatesModule@basehtml/code/modules/baseModule@dynamicdatahtml/code/modules/dynamicdataModule......Theme@themehtml/themesProperty@propertyhtml/code/propertiesBlock@blockhtml/code/blocksXaraya Twig Extensions
----------------------

[](#xaraya-twig-extensions)

Since Blocklayout allows significant PHP processing in templates and Twig deliberately does not, many of the common API calls to static core methods have been made available as Twig functions. Similarly, most Blocklayout and Xaraya tags have their equivalent Twig functions too.

This made translation of all templates from Blocklayout to Twig feasible, but for future template development we highly recommend to prepare all needed template variables up-front in the PHP functions, and then pass them along to the template as intended.

###  Health Score

44

↑

FairBetter than 90% of packages

Maintenance94

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~39 days

Recently: every ~46 days

Total

21

Last Release

28d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1447115?v=4)[Mike's Pub](/maintainers/mikespub)[@mikespub](https://github.com/mikespub)

---

Top Contributors

[![mikespub](https://avatars.githubusercontent.com/u/1447115?v=4)](https://github.com/mikespub "mikespub (74 commits)")

### Embed Badge

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

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[mati365/ckeditor5-symfony

CKEditor 5 integration for Symfony

262.6k](/packages/mati365-ckeditor5-symfony)

PHPackages © 2026

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