cyril-verloop / symfony-twig-templates
This package is abandoned and no longer maintained.
No replacement package was suggested.
A base Twig template for Symfony.
Package info
github.com/cyrilverloop/symfony-twig-templates
Language:Twig
pkg:composer/cyril-verloop/symfony-twig-templates
Fund package maintenance!
2.1.1
2023-12-11 15:55 UTC
Requires
- symfony/asset: ^7.0
- twig/twig: ^3
README
Twig templates for Symfony 7+.
For compatibility with Symfony <7.0, see version <2.0 of this software.
Installation
As a Composer depedency
In your project directory run
user@host project$ composer require "cyril-verloop/symfony-twig-templates"
For development purposes
user@host ~$ cd [PATH_WHERE_TO_PUT_THE_PROJECT] # E.g. ~/projects/ user@host projects$ git clone https://github.com/cyrilverloop/symfony-twig-templates.git user@host projects$ cd symfony-twig-templates
Usage
The templates just needs to be referenced in the config/packages/twig.yaml file :
twig: paths: '%kernel.project_dir%/vendor/cyril-verloop/symfony-twig-templates/templates': CVSymfonyTwigTemplates
You can also look at the config/packages/twig.yaml file of this project.
Then, you can inherit the templates :
{% extends "@CVSymfonyTwigTemplates/base.html.twig" %}
{# or #}
{% extends "@CVSymfonyTwigTemplates/layout.html.twig" %}
{# Your code here #}
The documentation of each template can be found in resources/documentations/ :