PHPackages                             mage-obsidian/module-modern-frontend-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. mage-obsidian/module-modern-frontend-twig

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

mage-obsidian/module-modern-frontend-twig
=========================================

Optional Twig template engine for MageObsidian ModernFrontend. Installing it registers a .twig engine alongside Magento's native .phtml.

2.0.0(2mo ago)00MITPHPCI passing

Since Apr 17Pushed todayCompare

[ Source](https://github.com/mage-obsidian/module-modern-frontend-twig)[ Packagist](https://packagist.org/packages/mage-obsidian/module-modern-frontend-twig)[ RSS](/packages/mage-obsidian-module-modern-frontend-twig/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (2)Used By (0)

MageObsidian ModernFrontend — Twig engine (optional)
====================================================

[](#mageobsidian-modernfrontend--twig-engine-optional)

Optional add-on for [`mage-obsidian/module-modern-frontend`](https://packagist.org/packages/mage-obsidian/module-modern-frontend). Installing this module registers a **`.twig` template engine alongside Magento's native `.phtml`**; removing it leaves only `.phtml`. Nothing else opts in — the engine is enabled by the module's presence.

How it works
------------

[](#how-it-works)

Magento dispatches a block's template by file extension (`Magento\Framework\View\Element\Template::fetchView` → `TemplateEnginePool`). This module adds a `twig` entry to that engine map, so a block whose `template` ends in `.twig` is rendered by Twig while every `.phtml` keeps using the PHP engine. `.twig` and `.phtml` coexist in the same theme, and the theme fallback resolves `.twig` overrides exactly like `.phtml`.

What you get over phtml
-----------------------

[](#what-you-get-over-phtml)

- **HTML auto-escaping on by default** — the main security gain; opt out per value with Twig's `raw`.
- **Twig inheritance** (`{% extends %}` / `{% block %}`) and includes, resolved through the Magento theme fallback (use `Vendor_Module::path.twig` names).
- **The MageObsidian bridge**, so a `.twig` mounts Vue islands like a `.phtml`:
    - `{{ render_vue('Vendor_Module::Component', { prop: value }) }}`
    - `{{ child_html('alias') }}`, `{{ hero_icon('check', 'solid', '24') }}`
    - `{{ vite_url(path) }}`, `{{ component_path(name) }}`, `{{ view_file_url(fileId) }}`
    - filters mirroring `$escaper`: `|escape_url`, `|escape_html_attr`, `|escape_js`, `|escape_css`
- Block data via `{{ block.getX() }}` / `{{ block.getData('x') }}`.

Compiled templates are cached under `var/cache/twig`. In developer mode templates auto-reload on change and `strict_variables` / `debug` are enabled.

> Note: this engine improves **server-template ergonomics**. It does not change runtime/browser performance — that is governed by the Vue/Vite/Tailwind output.

Documentation
-------------

[](#documentation)

For more details, visit the [official documentation](https://mage-obsidian.jeanmarcos.dev/).

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance94

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

67d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/26399111?v=4)[Jeanmarcos](/maintainers/jeanmarcos-dev)[@jeanmarcos-dev](https://github.com/jeanmarcos-dev)

---

Top Contributors

[![jeanmarcos-dev](https://avatars.githubusercontent.com/u/26399111?v=4)](https://github.com/jeanmarcos-dev "jeanmarcos-dev (6 commits)")

### Embed Badge

![Health badge](/badges/mage-obsidian-module-modern-frontend-twig/health.svg)

```
[![Health](https://phpackages.com/badges/mage-obsidian-module-modern-frontend-twig/health.svg)](https://phpackages.com/packages/mage-obsidian-module-modern-frontend-twig)
```

###  Alternatives

[craftcms/cms

Craft CMS

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

PHPackages © 2026

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