nickyeoman/nytwig

Twig template scaffolding

Maintainers

Package info

github.com/nickyeoman/nytwig

Homepage

Language:Twig

pkg:composer/nickyeoman/nytwig

Statistics

Installs: 118

Dependents: 1

Suggesters: 0

Stars: 1

Open Issues: 0

1.0.10 2024-04-17 21:33 UTC

This package is auto-updated.

Last update: 2026-02-18 02:12:19 UTC


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.