cyril-verloop/templates-bundle

Some basic templates for Symfony 7+.

Fund package maintenance!
cyrilverloop

Installs: 147

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:Twig

Type:symfony-bundle

1.0.0 2024-01-16 18:00 UTC

This package is auto-updated.

Last update: 2024-09-05 18:31:11 UTC


README

Templates for Symfony 7+.

License

Installation

As a Composer depedency

In your project directory run

user@host project$ composer require "cyril-verloop/templates-bundle"

For development purposes

user@host ~$ cd [PATH_WHERE_TO_PUT_THE_PROJECT] # E.g. ~/projects/
user@host projects$ git clone https://github.com/cyrilverloop/templates-bundle.git
user@host projects$ cd templates-bundle

Usage

With Symfony Flex, you do not need to add the configuration. Without Symfony Flex, the templates needs to be referenced in the config/packages/twig.yaml file :

twig:
    paths:
        '%kernel.project_dir%/vendor/cyril-verloop/templates-bundle/templates': CVTemplatesBundle

You can also look at the config/packages/twig.yaml file of this project.

Then, you can inherit the templates :

{% extends "@CVTemplatesBundle/base.html.twig" %}
{# or #}
{% extends "@CVTemplatesBundle/layout.html.twig" %}

{# Your code here #}

Detailed documentation

You can find detailed informations in the documentation.