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

ActiveTypo3-cms-extension[Templating &amp; Views](/categories/templating)

cvc/typo3-twig
==============

Use the Twig template engine within your TYPO3 project.

3.0.1(3mo ago)1020.6k↓50%6[12 issues](https://github.com/cvc-digital/typo3-twig/issues)[1 PRs](https://github.com/cvc-digital/typo3-twig/pulls)GPL-3.0-or-laterPHPPHP ^8.1CI passing

Since Nov 26Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/cvc-digital/typo3-twig)[ Packagist](https://packagist.org/packages/cvc/typo3-twig)[ Docs](https://cvc.digital)[ RSS](/packages/cvc-typo3-twig/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (13)Versions (21)Used By (0)

Twig Extension for TYPO3
========================

[](#twig-extension-for-typo3)

[![Build Status](https://camo.githubusercontent.com/3801bf2624d57070aa7c9b7ad41b04d051a5a9582bbc2c9f29249fb4c03810e0/68747470733a2f2f7472617669732d63692e6f72672f6376632d6469676974616c2f7479706f332d747769672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/cvc-digital/typo3-twig)[![GitHub license](https://camo.githubusercontent.com/6d0f302a990be5d38200a45afa7b4b120f0442634aa88bfe3c38b3ce909086df/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6376632d6469676974616c2f7479706f332d747769672e737667)](https://github.com/cvc-digital/typo3-twig/blob/master/LICENSE)[![Packagist](https://camo.githubusercontent.com/43c0d8b96b625a6d46b7917dd43757fc7aafa95b817ac202e415430b1dc554df/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6376632f7479706f332d747769672e737667)](https://packagist.org/packages/cvc/typo3-twig)[![TYPO3 Version](https://camo.githubusercontent.com/db7095b137b78828f23101b67afe36b5d004704e0a4cd3c9f1de0a370fe36c65/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d25354531302e332d6f72616e67652e737667)](https://extensions.typo3.org/extension/cvc_twig/)[![codecov](https://camo.githubusercontent.com/4f48cc87043643d6ed8bccacfbede08976ab2ce6482026b2a7bd9dfd51eadcee/68747470733a2f2f636f6465636f762e696f2f67682f6376632d6469676974616c2f7479706f332d747769672f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/cvc-digital/typo3-twig)

This TYPO3 extensions allows you to use the fabulous Twig template engine within your TYPO3 project.

You can use Twig templates in your Extbase controllers or in your TypoScript.

Version compatibility
---------------------

[](#version-compatibility)

The following table shows which versions of this package are compatible with which TYPO3 version.

- Version 1 is compatible to TYPO3 `8.7` and `9.5`.
- Version 2 is compatible to TYPO3 `10.4` and `11.5`.
- Version 3 that is developed on the `master` branch is only compatible to TYPO3 v12

Since Version 2, PHP `7.4` is required.

[1.x](https://github.com/cvc-digital/typo3-twig/tree/1.x)2.x3.xTYPO3 v12❌❌✅TYPO3 v11❌✅❌TYPO3 v10❌✅❌TYPO3 v9✅❌❌TYPO3 v8✅❌❌PHP 8.3❌❌✅PHP 8.2❌❌✅PHP 8.1❌✅✅PHP 8.0❌✅❌PHP 7.4✅✅❌PHP 7.3✅❌❌PHP 7.2✅❌❌Installation
------------

[](#installation)

This extension only works when installed in composer mode. If you are not familiar using composer together with TYPO3 yetyou can find a [how to on the TYPO3 website](https://composer.typo3.org/).

Install the extension with the following command:

```
composer require cvc/typo3-twig
```

Getting started
---------------

[](#getting-started)

Rendering of Twig templates works nearly exactly the same way as rendering Fluid templates.

In contrast to Fluid there are no "layouts" nor "partials" in Twig. Everything is "just" a template. Therefore there are some features missing that you are probably used by Fluid.

### Render templates in TypoScript

[](#render-templates-in-typoscript)

To render a Twig template you can use the `TWIGTEMPLATE` content object. You can use it similar to the way, Fluid was used before. The `variables` are rendered as content objects and data processing is also possible.

```
page = PAGE
page.10 = TWIGTEMPLATE
page.10 {
    templateName = example.html.twig
    variables {
        foo = TEXT
        foo.value = Bar!
    }
    templateRootPaths {
        10 = EXT:cvc_twig/Resources/Private/TwigTemplates
    }
    dataProcessing {
        10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
        10 {
            references.fieldName = image
        }
    }
}

```

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

[](#documentation)

The full documentation is available here: [cvc\_twig Documentation](https://docs.typo3.org/p/cvc/typo3-twig/master/en-us/).

Alternatives
------------

[](#alternatives)

This extension is not the first extension that supports rendering Twig templates. We decided to create our own extension, because other extensions were either not maintained anymore, they carried to much overhead or they were not developed close to the Fluid reference implementation.

In the table below you can find other extensions that provides an integration for the Twig template engine:

- [Twig for TYPO3](https://extensions.typo3.org/extension/twig_for_typo3/)
- [T3twig](https://extensions.typo3.org/extension/t3twig/)
- [Twypo](https://extensions.typo3.org/extension/twypo/)

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance60

Regular maintenance activity

Popularity34

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 87.1% 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 ~145 days

Recently: every ~272 days

Total

19

Last Release

111d ago

Major Versions

1.x-dev → 2.0.0-alpha12020-04-16

2.2.2 → 3.0.0-Alpha.12023-02-01

PHP version history (5 changes)1.0.0PHP &gt;=7.2

1.0.1PHP &gt;=7.2,&lt;7.4

2.0.0-alpha1PHP ^7.4

2.2.0PHP ^7.4 || ^8.0 || ^8.1

3.0.0-Alpha.1PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/ea45298e271c0c0fc3c7869aff5f563d1e9c35be86c2505a4dda3f1da0004bc0?d=identicon)[markuspoerschke](/maintainers/markuspoerschke)

![](https://www.gravatar.com/avatar/4ad74840748064f52ebd90d9114ed19582d2f4bf50cae9a82915a1d2b56059a6?d=identicon)[cvc-digital](/maintainers/cvc-digital)

---

Top Contributors

[![markuspoerschke](https://avatars.githubusercontent.com/u/1222377?v=4)](https://github.com/markuspoerschke "markuspoerschke (108 commits)")[![lukasnetz](https://avatars.githubusercontent.com/u/54134036?v=4)](https://github.com/lukasnetz "lukasnetz (6 commits)")[![robinkitzelmann](https://avatars.githubusercontent.com/u/42413416?v=4)](https://github.com/robinkitzelmann "robinkitzelmann (3 commits)")[![sebastianstroeher](https://avatars.githubusercontent.com/u/53937036?v=4)](https://github.com/sebastianstroeher "sebastianstroeher (2 commits)")[![marclindemann](https://avatars.githubusercontent.com/u/2149060?v=4)](https://github.com/marclindemann "marclindemann (2 commits)")[![MarkusEhrlich](https://avatars.githubusercontent.com/u/886073?v=4)](https://github.com/MarkusEhrlich "MarkusEhrlich (1 commits)")[![RonaldKools](https://avatars.githubusercontent.com/u/15251435?v=4)](https://github.com/RonaldKools "RonaldKools (1 commits)")[![GreenSumo](https://avatars.githubusercontent.com/u/21283755?v=4)](https://github.com/GreenSumo "GreenSumo (1 commits)")

---

Tags

twigtypo3typo3-extension

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[fluidtypo3/vhs

This is a collection of ViewHelpers for performing rendering tasks that are not natively provided by TYPO3's Fluid templating engine.

1954.1M49](/packages/fluidtypo3-vhs)[typo3/testing-framework

The TYPO3 testing framework provides base classes for unit, functional and acceptance testing.

675.0M775](/packages/typo3-testing-framework)[eliashaeussler/typo3-warming

Warming - Warms up Frontend caches based on an XML sitemap. Cache warmup can be triggered via TYPO3 backend or using a console command. Supports multiple languages and custom crawler implementations.

20229.9k](/packages/eliashaeussler-typo3-warming)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

96374.6k23](/packages/friendsoftypo3-content-blocks)[eliashaeussler/typo3-form-consent

Extension for TYPO3 CMS that adds double opt-in functionality to EXT:form

1481.0k](/packages/eliashaeussler-typo3-form-consent)

PHPackages © 2026

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