PHPackages                             candoimage/frctl\_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. candoimage/frctl\_twig

ActiveLibrary[Templating &amp; Views](/categories/templating)

candoimage/frctl\_twig
======================

Twig extension to integrate seamlessly with fractal twig adapter

v1.0.0-alpha6(7y ago)32.4k1MITPHPPHP &gt;=7.0

Since Mar 1Pushed 7y ago7 watchersCompare

[ Source](https://github.com/CandoImage/frctl_twig)[ Packagist](https://packagist.org/packages/candoimage/frctl_twig)[ Docs](https://github.com/CandoImage/frctl_twig)[ RSS](/packages/candoimage-frctl-twig/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (7)Used By (0)

FrctlTwigExtension
==================

[](#frctltwigextension)

The FrctlTwigExtension component allows you set seamlessly integrate your [Fractal twig templates](https://github.com/frctl/twig).

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

[](#installation)

To install the latest stable version of this component, open a console and execute the following command:

```
$ composer require candoimage/frctl_twig

```

Usage
-----

[](#usage)

The first step is to [register the extension](https://symfony.com/doc/2.1/cookbook/templating/twig_extension.html#register-an-extension-as-a-service) in the twig environment

```
services:
    Frctl\Twig\Extension\FrctlTwigExtension:
        tags:
            - { name: twig.extension }
```

or manually in your code

```
/* @var $twig Twig_Environment */
$twig->addExtension(new Frctl\Twig\Extension\FrctlTwigExtension());
```

Then you need to [configure the new include namespace](https://symfony.com/doc/current/templating/namespaced_paths.html) the fractal templates:

```
twig:
  paths:
    '%kernel.project_dir%/../frontend/src/components': FrctlTwig
```

or manually in your code

```
$loader->addPath(dirname(__DIR__) . '/../frontend/src/components', 'FrctlTwig');
```

Once registered, you can use the new `render` tag [seamlessly](https://github.com/frctl/twig#render) in your twig templates:

```

    title

    {% render "@component" with {some: 'values'} %}

```

Advanced examples:

```
{# @component will have access to the variables from the current context and the additional ones provided #}
{% render'@component' with {'foo': 'bar'} %}

{# only the foo variable will be accessible #}
{% render'@component' with {'foo': 'bar'} only %}

{# @component will have access to the variables from the current context and the additional ones provided and the ones provided in the fractal yml config #}
{% render'@component' with {'foo': 'bar'} merge frctl context %}

{# only the foo variable and the ones provided in the fractal yml config will be accessible #}
{% render'@component' with {'foo': 'bar'} only merge frctl context %}
```

The variable `variant` contains the selected variant.

License
-------

[](#license)

This component is under the MIT license. See the complete license in the [LICENSE](LICENSE) file.

Reporting an issue or a feature request
---------------------------------------

[](#reporting-an-issue-or-a-feature-request)

Issues and feature requests are tracked in the [Github issue tracker](https://github.com/CandoImage/frctl_twig/issues).

Author Information
------------------

[](#author-information)

[Peter Philipp @ Cando Image](https://www.cando-image.com).

If you find this component useful, please add a ★ in the [GitHub repository page](https://github.com/CandoImage/frctl_twig).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~10 days

Total

6

Last Release

2576d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/465c1b78706bdc2eb97899705024a6e3cc08958aec8f3e7990ccfdba6cf69439?d=identicon)[das-peter](/maintainers/das-peter)

---

Top Contributors

[![das-peter](https://avatars.githubusercontent.com/u/177531?v=4)](https://github.com/das-peter "das-peter (7 commits)")[![lbochsler](https://avatars.githubusercontent.com/u/262261?v=4)](https://github.com/lbochsler "lbochsler (1 commits)")

---

Tags

twigfractal

### Embed Badge

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

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

###  Alternatives

[twig/extra-bundle

A Symfony bundle for extra Twig extensions

91292.0M315](/packages/twig-extra-bundle)[twig/intl-extra

A Twig extension for Intl

36663.2M221](/packages/twig-intl-extra)[rcrowe/twigbridge

Adds the power of Twig to Laravel

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

A Twig extension for Symfony String

21946.0M133](/packages/twig-string-extra)[twig/cssinliner-extra

A Twig extension to allow inlining CSS

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

Twig components for Symfony

21814.8M162](/packages/symfony-ux-twig-component)

PHPackages © 2026

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