Composer will install the bundle to your project's vendor directory., (*5)
Include
Including the bundle to your Symfony project is as easy as to do a few simple steps., (*6)
1) Enable the bundle in application kernel for prod environment:, (*7)
``` php
<?php
// app/AppKernel.php, (*8)
public function registerBundles()
{
$bundles = array(
// other bundles...
new LapaLabs\SkeletonBundle\LapaLabsSkeletonBundle(),
);
}, (*9)
2) Register the bundle's routes for `dev` environment *(optional, if you want to see demo examples)*:
``` yaml
# app/config/routing_dev.yml
_lapalabs_skeleton_bundle:
resource: "@LapaLabsSkeletonBundle/Controller/"
type: annotation
prefix: /_lapalabs/skeleton
Usage
The best practices is to create your own template, that extends skeleton one.
For example, create your own layout.html.twig in AppBundle:, (*10)
{% block css %}
{{ parent() }} {# if you want to include content of parent block #}
{% endblock %}, (*13)
{% block js %}
{% endblock %}, (*14)
And then you can extends it in other templates:
``` jinja
{# src/AppBundle/Resources/views/Post/show.html.twig #}
{% extends 'AppBundle::layout.html.twig' %}
{% block content_wrap %}
{{ entity.heading }}
<p>{{ entity.description }}</p>
{% endblock %}
Congratulations!
You're ready to rock your templates to extends skeleton templates!, (*15)
More documentation:
* Overriding Bundle Templates
* [How to Use Bundle Inheritance to Override Parts of a Bundle][2], (*16)