PHPackages                             template\_designer/layout\_bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. template\_designer/layout\_bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

template\_designer/layout\_bundle
=================================

create and edit page responsive design

0121PHP

Since Jan 26Pushed 11y ago1 watchersCompare

[ Source](https://github.com/shinmen/layoutdesigner)[ Packagist](https://packagist.org/packages/template_designer/layout_bundle)[ RSS](/packages/template-designer-layout-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

TemplateDesignerLayoutBundle
============================

[](#templatedesignerlayoutbundle)

Create and edit your global pages design in a wysiwyg fashion thanks to twitter boostrap framework

Installation
============

[](#installation)

Add LayoutBundle by running the command:

```
$ php composer.phar require template_designer/layout_bundle "*"
```

then register the bundle with your kernel in 'app/AppKernel.php':

```
public function registerBundles()
{
    $bundles = array(
        // ...
        new TemplateDesigner\LayoutBundle\TemplateDesignerLayoutBundle(),
        // ...
    );

    // ...
}
```

Requirements:

- jquery ()
- jquery ui ()
- twitter bootstrap V3 ()

None are included in the vendor

Configuration
=============

[](#configuration)

Import all routes from the bundle

```
# app/config/routing.yml

template_designer_layout:
    resource: "@TemplateDesignerLayoutBundle/Controller/"
    type:     annotation
    prefix:   /
```

```
# app/config/config.yml

template_designer_layout:
    custom_param_template: # necessary to deal with include or render with parameters - example MyBundle:Default:customParams.html.twig
    data_collector_css:
        main: # required / example : bundles/yourBundle/bootstrap/css/bootstrap.min.css
        #optional: # default null / other css if necessary
    # assetic : #default true
    # template_engine: #default bootstrap
    # base_twig : #from which to extend - default ::base.html.twig
    # class_configuration:
    #     layout_choice_form: #default TemplateDesigner\LayoutBundle\Form\LayoutEditionType
    #	  layout_edit_form : #default TemplateDesigner\LayoutBundle\Form\LayoutType
```

Do not forget to install assets

```
$ app/console assets:install web (--symlink)
```

Usage
=====

[](#usage)

\##Routes:

- your url/layout to create templates
- your url/layout/edit to edit templates

\##Step 1:

Create your first template and name it. Names are unique and will be the id of the template when we request it

Once you've created all the blocks in your template page, go to the edit route to assign static templates or render templates for one or more blocks. Should you need to give parameters to a block, you must give the block a custom parameters name as well as an include or a render in order to access the parameters later on.

\##Step 2:

```
namespace YourProject\DefaultBundle\Controller;
#To display the page with your templates and blocks, you just have to call the annotation that will inject the layout entity (rootLayout) in your twig and wrap your parameters in an array parameter called 'params'

use TemplateDesigner\LayoutBundle\Annotation\LayoutAnnotation;
class DefaultController extends Controller
{
	/**
     * @Route("/hello/{name}")
     * @LayoutAnnotation(name="test")
     */
    public function indexAction($name)
    {
        return $this->render('YourProjectDefaultBundle:Default:index.html.twig',array('name'=>$name));
    }
}
```

In your twig template, you call the twig function with the injected layout entity and your parameters

```
{% block body %}
	{{render_layout(rootLayout.name,params)|raw}}
{% endblock %}
```

If you need to display only one block in your template, you can use the position of the block to reference it:

```
{% block body %}
    {{render_layout(rootLayout.name,params,2)|raw}}
{% endblock %}
```

You can choose not to display the container in your template:

```
{% block body %}
    {{render_layout(rootLayout.name,params,null,true)|raw}}
{% endblock %}
```

Two additionnal twig functions are available to display only the html tags with ids, classes but no content. As shown above, you can set a position to display exactly the block you wish:

```
{% block body %}
    {{layoutStart ($rootName,$position=null)}}
        content
    {{layoutEnd ($rootName,$position=null)}}
{% endblock %}
```

When you need to access a parameter inside a block, you can use the custom\_param\_template

```
{% if child.root.name == "test" and child.custom == "custom name" %}
	{% render(controller(child.render,{name:params['name']})) %}
{% endif %}
```

\##Display Layout in toolbar If you need to see what content goes into which block, you can access the template design in the debug toolbar

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f855f8d370635489db186a69f6559e08ff605fc7046707827c5f9255d9a7654?d=identicon)[shinmen33](/maintainers/shinmen33)

---

Top Contributors

[![shinmen](https://avatars.githubusercontent.com/u/4790740?v=4)](https://github.com/shinmen "shinmen (27 commits)")

### Embed Badge

![Health badge](/badges/template-designer-layout-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/template-designer-layout-bundle/health.svg)](https://phpackages.com/packages/template-designer-layout-bundle)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
