PHPackages                             bez/zfview-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. bez/zfview-bundle

ActiveLibrary[Templating &amp; Views](/categories/templating)

bez/zfview-bundle
=================

Multi-step layouts and view helpers for Symfony2 via Zend\\View component

v0.1.0(12y ago)3251MITPHPPHP &gt;=5.3.3

Since Jan 22Pushed 12y ago1 watchersCompare

[ Source](https://github.com/bezhermoso/ZfViewBundle)[ Packagist](https://packagist.org/packages/bez/zfview-bundle)[ Docs](https://github.com/bezhermoso/ZfViewBundle)[ RSS](/packages/bez-zfview-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

ZfViewBundle
============

[](#zfviewbundle)

Brings the Zend\\View templating paradigm of composite views and view helpers within your Symfony2 project.

*2014-01-22 update:*

- `$container->get('templating')->renderResponse('path/to/template.phtml', array $vars)` should now be working as expected.
- Layout can now be set from within templates.

\##Installation

You can install this bundle via Composer:

`php composer.phar require bez/zfview-bundle:v0.1.0`

Register the bundle in `app/AppKernel.php`:

```
!
```

Child views -- in this case, `src/FooBundle/Resources/views/Some/some.phtml` -- are evaluated before the parent layouts. The output is captured to the `$this->content` variable and thus can be injected into the layout as follows:

In `src/FooBundle/Resources/layout.phtml`

```

    ...

```

The fact that child views are evaluated first is very significant. This allows child views to modify elements (i.e., stylesheets, scripts, menus, etc.) in the parent layout by means of [view helpers](Resources/docs/view-helpers.md).

\###Overriding rendering options

Layouts can also be defined within the `@Rendering` annotation in a method and will take precedence:

```
