SkeletonBundle
The HTML markup skeleton of base templates for Symfony Framework, (*1)
, (*2)
This bundle no more maintained
The development has moved to a new repository., (*3)
Install
Install bundle with Composer
dependency manager first by running the command:, (*4)
$ composer require "bocharsky-bw/skeleton-bundle:dev-master"
, (*5)
Composer
will install the bundle to your project's vendor
directory., (*6)
Include
Including the bundle to your Symfony
project is as easy as to do a few simple steps., (*7)
1) Enable the bundle in application kernel for prod
environment:, (*8)
``` php
<?php
// app/AppKernel.php, (*9)
public function registerBundles()
{
$bundles = array(
// other bundles...
new BW\SkeletonBundle\BWSkeletonBundle(),
);
}, (*10)
2) Add few parameters used in the skeleton templates
*(You should to add this parameters in both `parameters.yml` and `parameters.yml.dist` files in `app/config` folder)*:
``` yaml
# app/config/parameters.yml
# app/config/parameters.yml.dist
parameters:
locale: ru
title_prefix: ~
title_suffix: ~
description_prefix: ~
description_suffix: ~
3) Import config resource to passed parameters to the skeleton templates as global twig variables:, (*11)
``` yaml, (*12)
app/config/config.yml
imports:
- { resource: "@BWSkeletonBundle/Resources/config/config.yml" }, (*13)
4) Register the bundle's routes for `dev` environment *(optional, if you want to see examples)*:
``` yaml
# app/config/routing_dev.yml
_bw_skeleton_bundle:
resource: "@BWSkeletonBundle/Resources/config/routing.yml"
prefix: /_bw
Congratulations!
You're ready to rock your templates to extends skeleton templates!, (*14)