2017 © Pedro Peláez
 

library skeleton-bundle

The HTML markup skeleton of base templates for Symfony Framework

image

lapalabs/skeleton-bundle

The HTML markup skeleton of base templates for Symfony Framework

  • Tuesday, June 9, 2015
  • by bocharsky-bw
  • Repository
  • 1 Watchers
  • 0 Stars
  • 106 Installations
  • HTML
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

SkeletonBundle

The HTML markup skeleton of base templates for Symfony Framework, (*1)

SensioLabsInsight, (*2)

Install

Install bundle with Composer dependency manager first by running the command:, (*3)

$ composer require "lapalabs/skeleton-bundle:dev-master", (*4)

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)

``` jinja {# src/AppBundle/Resources/views/layout.html.twig #}, (*11)

{% extends 'LapaLabsSkeletonBundle:html5:layout.html.twig' %}, (*12)

{% 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)

The Versions

09/06 2015

dev-master

9999999-dev https://github.com/lapalabs/SkeletonBundle

The HTML markup skeleton of base templates for Symfony Framework

  Sources   Download

MIT

The Requires

 

template skeleton bundle base markup layout lapalabs

09/03 2015

v0.0.1

0.0.1.0 https://github.com/lapalabs/SkeletonBundle

The HTML markup skeleton of base templates for Symfony Framework

  Sources   Download

MIT

The Requires

 

template skeleton bundle base markup layout lapalabs