<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Zend Framework: Using View Helpers to Build Rich, Scalable, Controls</title>
	<atom:link href="http://www.killerphp.com/articles/zend-framework-view-helpers/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.killerphp.com/articles/zend-framework-view-helpers/</link>
	<description>Dedicated to teaching web designers PHP.</description>
	<pubDate>Sun, 07 Sep 2008 20:57:47 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Elijah Insua</title>
		<link>http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-76292</link>
		<dc:creator>Elijah Insua</dc:creator>
		<pubDate>Mon, 24 Mar 2008 04:07:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-76292</guid>
		<description>I have used this method with various php frameworks many times.  I actually prefer breaking up my templates and following a half 'naked objects' approach where the actual item that you are working with contains the templates and business logic.</description>
		<content:encoded><![CDATA[<p>I have used this method with various php frameworks many times.  I actually prefer breaking up my templates and following a half &#8216;naked objects&#8217; approach where the actual item that you are working with contains the templates and business logic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zend Framework: Using View Helpers to Build Rich, Scalable, Controls</title>
		<link>http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-76286</link>
		<dc:creator>Zend Framework: Using View Helpers to Build Rich, Scalable, Controls</dc:creator>
		<pubDate>Sat, 22 Mar 2008 19:52:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-76286</guid>
		<description>[...] More: continued here [...]</description>
		<content:encoded><![CDATA[<p>[...] More: continued here [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Lebensold</title>
		<link>http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-76188</link>
		<dc:creator>Jon Lebensold</dc:creator>
		<pubDate>Thu, 28 Feb 2008 07:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-76188</guid>
		<description>@Lee: Thanks for mentioning this! I was looking for a way to call View Helpers without creating a whole new Zend_View or having to create custom classes that would be called from a view helper only for some instances.</description>
		<content:encoded><![CDATA[<p>@Lee: Thanks for mentioning this! I was looking for a way to call View Helpers without creating a whole new Zend_View or having to create custom classes that would be called from a view helper only for some instances.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-72004</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Tue, 12 Feb 2008 02:03:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-72004</guid>
		<description>This is a great post! I am in need of partials in my project and this post set me on the right path to figuring out how to do it. I'm not using AJAX but this idea is very useful. The only thing I am doing differently is that instead of instantiating a new Zend_View and setting the basepath in my View Helper I am retrieving the View Helper that is already initialized in my View Renderer like this:

$view = Zend_Controller_Action_HelperBroker::getExistingHelper('viewRenderer')-&#62;view;

Then you can set variables for your view scripts and render them like this:

$view-&#62;someVar = "someValue";
$out = $view-&#62;render("path/to/viewScript.phtml"); 
return $out;

This saves you from having to create a brand new Zend_View and trying to figure out how to set the basepath in a portable way. You do need to be mindful of the fact that you aren't creating a new namespace for your partial so be ware of variable name clashes. Since you are reusing the same view your controller is using, anything you set using $this-&#62;view-&#62;whatever will also be available in your partial view script as $this-&#62;whatever.</description>
		<content:encoded><![CDATA[<p>This is a great post! I am in need of partials in my project and this post set me on the right path to figuring out how to do it. I&#8217;m not using AJAX but this idea is very useful. The only thing I am doing differently is that instead of instantiating a new Zend_View and setting the basepath in my View Helper I am retrieving the View Helper that is already initialized in my View Renderer like this:</p>
<p>$view = Zend_Controller_Action_HelperBroker::getExistingHelper(&#8217;viewRenderer&#8217;)-&gt;view;</p>
<p>Then you can set variables for your view scripts and render them like this:</p>
<p>$view-&gt;someVar = &#8220;someValue&#8221;;<br />
$out = $view-&gt;render(&#8221;path/to/viewScript.phtml&#8221;);<br />
return $out;</p>
<p>This saves you from having to create a brand new Zend_View and trying to figure out how to set the basepath in a portable way. You do need to be mindful of the fact that you aren&#8217;t creating a new namespace for your partial so be ware of variable name clashes. Since you are reusing the same view your controller is using, anything you set using $this-&gt;view-&gt;whatever will also be available in your partial view script as $this-&gt;whatever.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Lebensold &#187; Blog Archive &#187; Article on Zend View Helpers</title>
		<link>http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-61235</link>
		<dc:creator>Jon Lebensold &#187; Blog Archive &#187; Article on Zend View Helpers</dc:creator>
		<pubDate>Fri, 01 Feb 2008 08:59:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.killerphp.com/articles/zend-framework-view-helpers/#comment-61235</guid>
		<description>[...] Another article has been posted on KillerPHP. This one is about Zend View_Helpers. I&#8217;ve been struggling with a good Zend Framework architecture that provides a development roadmap where controller logic can be easily refactored into AJAX controls. At work I&#8217;ve been researching web services for AJAX integration on the ASP.NET tip of things due to the lack of user-control support for AJAX.NET controls. I&#8217;m also not very impressed with the AJAX.NET Extenders since they seem to mix data that would be gathered from a web service and its presentation on the client. [...]</description>
		<content:encoded><![CDATA[<p>[...] Another article has been posted on KillerPHP. This one is about Zend View_Helpers. I&#8217;ve been struggling with a good Zend Framework architecture that provides a development roadmap where controller logic can be easily refactored into AJAX controls. At work I&#8217;ve been researching web services for AJAX integration on the ASP.NET tip of things due to the lack of user-control support for AJAX.NET controls. I&#8217;m also not very impressed with the AJAX.NET Extenders since they seem to mix data that would be gathered from a web service and its presentation on the client. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
