News Feed
Sections




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

Michelangelo van Dam's Blog:
Zend Framework context switching for HTML content
April 16, 2010 @ 08:43:35

Michelangelo van Dam has a new post to his blog today looking a a method for doing some context switching in his Zend Framework application to use jQuery in his app's static HTML output.

I had already build my apps using static HTML output generated by Zend Framework, so how could I add this richness to my apps without refactoring most of my code ? Simple, by using Zend_Controller_Action_Helper_ContextSwitch, ZendX_JQuery and some minor adjustments to my view scripts.

He includes some code (that's confirmed to work with ZF 1.10.3) using the contextSwitch method on a helper object that adds in the "json" type for the contexts that can be used for the responses. Then a new template is added for the type (like index.json.phtml for the json output). Make a change or two to your bootstrap file to add in the right jQuery helpers and your view is as simple as calling "$this->jQuery".

0 comments voice your opinion now!
zendframework context switch html tutorial


blog comments powered by Disqus

Similar Posts

PHPBuilder.com: Create a Dynamic Username Validator with PHP, MySQL and jQuery

DevShed: An Introduction to Simulating the Model-View-Controller Schema in PHP

Carson McDonald's Blog: Building HipHop PHP for Fedora 12 on 64 bit and 32 bit Systems

HowToForge: How To Install a Complete LEMP on Ubuntu/Debian

Brian Swan's Blog: Accessing OData for SQL Azure with AppFabric Access Control and PHP


Community Events





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


language voicesoftheelephpant series deployment tips laravel symfony release community conference framework api introduction code zendserver threedevsandamaybe interview podcast bugfix list

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