News Feed
Sections




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

Padraic Brady's Blog:
Zend Framework App Tutorial - Part 9 Zend_Vew and Displaying Blog Entries
May 27, 2008 @ 07:05:22

Padraic Brady has posted part seven of his series on building a blogging application with the Zend Framework as a base. This time he's working on the output of the entries - using Zend_View to standardize the look and feel.

In previous parts we've been using View Helpers without even noticing it. Zend_Form doesn't generate forms by itself, rather it delegates most of the HTML generation to a set of View Helpers like Zend_View_Helper_Form. The problem with such output, is that View Helpers can only generate XHTML 1.0 Strict output if we actually inform them of the standard to use. [...] What we should do, is make the Doctype of our View more dynamic. This is achievable by using the Doctype View Helper.

Padraic talks about the different parts of the View layer in the framework (helpers, partials, placeholders) that were mentioned in previous parts. He shows how to change up his current setup to work with the Doctype View Helper to change the view and make it UTF-8 compliant.

He shows the changes to the bootstrap file, how he's grabbing the entries from the database and how he pushes that out to the view to be displayed. He also creates a custom view helper to create the entry URLs for each of the posts (Wordpress users out there, these are the stubs).

0 comments voice your opinion now!
zendview zendframework helper placeholder custom entry url doctype


blog comments powered by Disqus

Similar Posts

Lingohub.com: Internationalization How To for the 5 most popular PHP frameworks

Padraic Brady's Blog: Zend Framework 2.0: Dependency Injection (Part 1)

Rob Allen's Blog: Using Action Helpers in Zend Framework

Padraic Brady's Blog: Complex Web Pages with the Zend Framework?

Chris Hartjes' Blog: The Story and Rebirth Of Zend_Service_Audioscrobbler, Part 2


Community Events





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


install developer series library interview threedevsandamaybe unittest api application framework community list release code introduction wordpress podcast configure language symfony

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