News Feed
Sections




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

Ben Ramsey's Blog:
Zend Framework View Notes
April 05, 2007 @ 06:59:44

In a new entry today, Ben Ramsey, how's been working with the Zend Framework for a bit now, shares an interesting bit of information about how to use Views a little bit differently.

Most notably, I've started using the "new way" of using views, which is still undocumented in the manual. Rather than create a new Zend_View object, tell it where my views are, and echo a call to its render() method, I'm letting the controller's render() method do it all for me.

He illustrates with a simple example using the default framework directory setup, save for the special "scripts" directory he creates. This makes it possible for the controller to handle the rendering rather than the typical view functionality. Then, using the views is a simple init() call away, automagically.

1 comment voice your opinion now!
zendframework view controller render init zendframework view controller render init


blog comments powered by Disqus

Similar Posts

ProDevTips.com: Writing a CMS/Community with Smarty and the Zend Framework: Part 6

Zend Developer Zone: Announcing the November 2010 Zend Framework Bug-Hunt

PHPBuilder.com: Boost PHP Site Performance with Zend Framework Data Caching

Till Klampaeckel's Blog: Zend Framework: Slow automatic view rendering

Slawek Lukasiewicz's Blog: Zend Framework: logging with Firebug and FirePHP


Community Events





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


podcast api series community bugfix release framework language install package symfony list tips introduction library opinion deployment interview laravel voicesoftheelephpant

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