lare_team / twig_lare
Lare backend for Twig
Installs: 71
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/lare_team/twig_lare
Requires
- php: >=5.3.3
- lare_team/php_lare: >=1.0.0
- twig/twig: ~1.0
This package is not auto-updated.
Last update: 2025-12-06 23:40:55 UTC
README
How to install twig-lare?
There are just two steps needed to install twig-lare:
-
Add twig-lare to your composer.json:
{ "require": { "lare_team/twig_lare": ">=1.0.0", } } -
Add Twig_Lare_Extension to the Twig-Engine:
$twig->addExtension(new Twig_Lare_Extension());
How do i use twig-lare?
Instead of using the {% extends %} tag use {% lare_extends %}.
{% lare_extends "::__base.html" 'Previous.Namespace' "::__lare.html" %}
{% block page %}
...
{% endblock page %}
or
{% lare_extends "::__base.html" 'Lare' %}
{% block page %}
...
{% endblock page %}
- The first argument is the template, which is extended if the request is not a Lare request, or the namespace does not match.
- The second argument is the namespace which should be tested against, to decide which template should be extended.
- The third argument is the template, which is extended if the namespace matches. (optional, default is "::__lare.html")
What do you need for twig-lare?
Projects using twig-lare
If you are using twig-lare, please contact me, and tell me in which projects you are using it. Thank you!
Happy speeding up your twig project!
For further information read twig-lare on iekadou.com