nickyeoman / nytwig
Twig template scaffolding
Installs: 116
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:Twig
README
This is the scaffolding Nick uses for his web projects.
It is based, but heavly modifed, on html5boilerplate.
Installation
You will have to configure your application to include the vendor directory and asssign the namespace "nytwig" (required)
How To Twig
$loader->addPath('vendor/nickyeoman/nytwig/src', 'nytwig');
How To Symfony
Open the file config/packages/twig.yaml
and add (under "default_path"):
paths: '%kernel.project_dir%/vendor/nickyeoman/nytwig/src': 'nytwig'
Use
{% extends '@nytwig/master.html.twig' %} {% block body %} <p>Content Here</p> {% endblock %}
Overrides
In your view directly create a folder named 'cms' and create the file you want to override there with the same name.