News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen's Blog:
A Tutorial Update & Extending ViewRenderer to Support Layout Templates
June 04, 2007 @ 09:33:00

Rob Allen has two new posts today, both revolving around the same thing - an update to the Zend Framework called the action helper ViewRenderer. The first just mentions an update to his "Intro to the Zend Framework" tutorial PDF, but the other gets a little more in-depth:

The Zend_Controller_Action_Helper_ViewRenderer action helper is a great bit of code that automates rendering a view template based on which action has been called. This is very useful, but renders the action template, not my layout template. To solve this, I am experimenting with extending the Zend_Controller_Action_Helper_ViewRenderer and overriding it so that it know about my layout template. I also prefer to use the view suffix "tpl.php" for my view scripts, so I've made my class automatically set my preferred view suffix.

He illustrates with some code, an example that shows how to tell the ViewRenderer about his "tpl.php" files and link them back to the action that's called on the URL.

0 comments voice your opinion now!
tutorial zendframework viewrenderer layout template tutorial zendframework viewrenderer layout template


blog comments powered by Disqus

Similar Posts

Shameer's Blog: PHP 5.3 : Practical look into Lambda functions and closures

Padraic Brady's Blog: Self-Contained Reusable Zend Framework Modules With Standardised Configurators

Master Zend Framework: Create a Simple File Upload Form in Zend Framework 2

DZone.com: Creating a virtual server with Vagrant: a practical walkthrough

Aleksey Martynov's Blog: Getting started with lexa-tools: Blog in 15 Minutes


Community Events





Don't see your event here?
Let us know!


wordpress release interview framework opinion list install testing configure developer unittest code series laravel introduction language community podcast refactor threedevsandamaybe

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework