PHPackages                             gradientz/twig-express-bundle - 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. gradientz/twig-express-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

gradientz/twig-express-bundle
=============================

Browse and render “static” Twig templates from bundles in a Symfony project. This bundle is a port of the TwigExpress tool, and is intended for private front-end prototypes, not public-facing pages.

3.1.0(8y ago)01.3kMITPHPPHP &gt;=5.4

Since Sep 19Pushed 8y ago2 watchersCompare

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

READMEChangelog (8)Dependencies (4)Versions (9)Used By (0)

KaliopTwigExpressBundle
=======================

[](#kalioptwigexpressbundle)

Browse and render “static” Twig templates in a Symfony project. This bundle is a port of the [TwigExpress](https://github.com/kaliop/twig-express) standalone tool, and is intended for private front-end prototypes. You might like it if you’re a designer or front-end developer working with Symfony. *Do not use this bundle or its routes in production!*

Features
--------

[](#features)

1. Gives access to the Twig templates in the `Resources/views/static` folder of a bundle, showing index pages for this folder and subfolders. (Note that the root folder can be changed for each bundle.)
2. Renders Twig templates, and reports Twig errors with an extract of the faulty template.

**Important:** this bundle’s controller will *not* be able to render templates that depend on data provided by other existing controllers. It’s intended for “static” prototypes which don’t depend on any data from databases or services.

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

[](#installation)

Install with [Composer](https://getcomposer.org/) in your Symfony project:

```
composer require kaliop/twig-express-bundle

```

Then you will need to register this bundle in `app/AppKernel.php`. This may look like:

```
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            /* ... */
            new Kaliop\TwigExpressBundle\KaliopTwigExpressBundle(),
        ];
    }
}
```

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

[](#getting-started)

Let’s say you have a bundle named `MyAwesomeBundle` and which contains “static” Twig templates in `MyAwesomeBundle/Resources/views/static`. By “static” Twig templates, we mean templates which do not depend on data provided by a controller. It could be simple HTML pages with `{% include %}` tags and other native Twig features.

First you will need to activate the TwigExpress routes. Add this to your routing config (for example in `routing_dev.yml`):

```
twig_express:
    resource: "@KaliopTwigExpressBundle/Resources/config/routing.yml"
```

Then, in your main config (for example in `config_dev.yml`), tell KaliopTwigExpressBundle that it can render templates from your bundle:

```
twig_express:
    bundles:
        -   MyAwesomeBundle
```

Finally, navigate to `http://[your-hostname]/static/` to explore your static views. You should be able to explore and render the Twig templates from `MyAwesomeBundle/Resources/views/static`.

Demo pages
----------

[](#demo-pages)

This bundle contains its own demo `static` templates, which demonstrate a few added features. To activate it, add this import to your `config_dev.yml`:

```
imports:
    - resource: "@KaliopTwigExpressBundle/Resources/config/demo.yml"
```

Advanced configuration
----------------------

[](#advanced-configuration)

For each bundle, instead of providing the bundle’s name only, you can change the URL slug (the part that identifies this bundle in the URL) and the path to the bundle’s “static” templates:

```
twig_express:
    bundles:
        # 'name' is required and must be a valid bundle name;
        # 'root' defaults to 'Resources/views/static';
        # 'slug' will use an automatic value if not defined.
        -   name: MyStaticBundle
            root: Resources/views/static-html
            slug: ohmy
        -   name: AwesomeStaticBundle
            root: Resources/components
            slug: awesome
```

If you would like to use a different URL base than `/static/…`, use the `twig_express.url_base` parameter:

```
parameters:
    twig_express.url_base: something-different
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Recently: every ~63 days

Total

8

Last Release

3252d ago

Major Versions

1.0.0 → 2.0.02016-09-23

2.0.4 → 3.0.02017-05-31

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

2.0.0PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/49a374822228db54f71489629bf27f278b3baef3125cde3cf8a4a0fe844b7fbd?d=identicon)[gradientz](/maintainers/gradientz)

### Embed Badge

![Health badge](/badges/gradientz-twig-express-bundle/health.svg)

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

###  Alternatives

[rcrowe/twigbridge

Adds the power of Twig to Laravel

9105.9M50](/packages/rcrowe-twigbridge)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

23018.5M53](/packages/twig-cssinliner-extra)[symfony/ux-twig-component

Twig components for Symfony

21814.8M160](/packages/symfony-ux-twig-component)[twig/markdown-extra

A Twig extension for Markdown

12114.3M82](/packages/twig-markdown-extra)[symfony/ux-live-component

Live components for Symfony

1635.6M71](/packages/symfony-ux-live-component)[twig/html-extra

A Twig extension for HTML

777.6M41](/packages/twig-html-extra)

PHPackages © 2026

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