<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Extending Zend_View_Interface for use with Smarty</title>
	<atom:link href="http://akrabat.com/zend-framework/extending-zend_view_interface-for-use-with-smarty/feed/" rel="self" type="application/rss+xml" />
	<link>http://akrabat.com/zend-framework/extending-zend_view_interface-for-use-with-smarty/</link>
	<description>Developing PHP software in the Real World, by Rob Allen</description>
	<lastBuildDate>Tue, 13 Mar 2012 12:47:13 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: alokin</title>
		<link>http://akrabat.com/zend-framework/extending-zend_view_interface-for-use-with-smarty/#comment-26425</link>
		<dc:creator>alokin</dc:creator>
		<pubDate>Wed, 13 May 2009 18:23:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/12/23/extending-zend_view_interface-for-use-with-smarty/#comment-26425</guid>
		<description>Hi Rob,

I&#039;m having a small problem about integration of Smarty in ZF...

I&#039;m developing an customized CMS, and it should be modular. For now on, there are to modules - default and admin. In those modules, there are similar (or same) names of controllers and their actions, i.e. IndexController and indexAction(). Problem is that Smarty returns the same compiled template for index actions in Index controller for both modules!

I somehow solved that problem by creating directory for each module in template_c. But I&#039;m wondering is there any better solution, maybe one that will tell Smarty to give names to those files in template_c in some other way.

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi Rob,</p>
<p>I'm having a small problem about integration of Smarty in ZF...</p>
<p>I'm developing an customized CMS, and it should be modular. For now on, there are to modules - default and admin. In those modules, there are similar (or same) names of controllers and their actions, i.e. IndexController and indexAction(). Problem is that Smarty returns the same compiled template for index actions in Index controller for both modules!</p>
<p>I somehow solved that problem by creating directory for each module in template_c. But I'm wondering is there any better solution, maybe one that will tell Smarty to give names to those files in template_c in some other way.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nikola</title>
		<link>http://akrabat.com/zend-framework/extending-zend_view_interface-for-use-with-smarty/#comment-24935</link>
		<dc:creator>Nikola</dc:creator>
		<pubDate>Tue, 07 Apr 2009 17:56:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/12/23/extending-zend_view_interface-for-use-with-smarty/#comment-24935</guid>
		<description>Hi,

I have a very bizarre problem with ZF and Smarty plugin...

I&#039;ve created helper (Smarty plugin), that just needs to output login form, or logout link based on whether user is signed in or not. Code looks something like this:
if (!Zend_Auth::getInstance()-&gt;hasIdentity()) {
    //outputting login form
}
else {
    //outputting logout link
}
That works just fine on every controller except one. I can&#039;t even visit that controller page, because of Invalid controller specified (error) exception. I know, that exception is thrown because I haven&#039;t created Error controller, but I can&#039;t believe that that plugin is not working only at one controller! 

I found out that the problem is in Zend_Auth::getInstance()-&gt;hasIdentity() code line, because when I remove that line, everything works fine and template is outputted properly. 

Does anyone know what could cause the problem?

Thanks.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I have a very bizarre problem with ZF and Smarty plugin...</p>
<p>I've created helper (Smarty plugin), that just needs to output login form, or logout link based on whether user is signed in or not. Code looks something like this:<br />
if (!Zend_Auth::getInstance()-&gt;hasIdentity()) {<br />
    //outputting login form<br />
}<br />
else {<br />
    //outputting logout link<br />
}<br />
That works just fine on every controller except one. I can't even visit that controller page, because of Invalid controller specified (error) exception. I know, that exception is thrown because I haven't created Error controller, but I can't believe that that plugin is not working only at one controller! </p>
<p>I found out that the problem is in Zend_Auth::getInstance()-&gt;hasIdentity() code line, because when I remove that line, everything works fine and template is outputted properly. </p>
<p>Does anyone know what could cause the problem?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Topbit</title>
		<link>http://akrabat.com/zend-framework/extending-zend_view_interface-for-use-with-smarty/#comment-20913</link>
		<dc:creator>Topbit</dc:creator>
		<pubDate>Mon, 31 Mar 2008 15:12:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/12/23/extending-zend_view_interface-for-use-with-smarty/#comment-20913</guid>
		<description>A quick fix to use this this class with ZF1.5+ and Zend_Form.

You have to call the Zend_View_Abstract constructor to set the paths to the helpers (like Zend_Form_Element_Text).

Add to the top of the constructor
parent::__construct(array()); ## add
$this-&gt;_engine = new Smarty(); # as before

Since you are clling the parent - you also have to extend the original

require_once &#039;Zend/View.php&#039;;
class AkCom_View_Smarty extends Zend_View implements Zend_View_Interface &lt;em&gt;....&lt;/em&gt;

# It&#039;s also useful to change the AkCom_View_Smarty::__constructor default parameter to &#039;array()&#039; (from: null), so it can be passed into the constructor unchanged
parent::__construct($params); ## alternate</description>
		<content:encoded><![CDATA[<p>A quick fix to use this this class with ZF1.5+ and Zend_Form.</p>
<p>You have to call the Zend_View_Abstract constructor to set the paths to the helpers (like Zend_Form_Element_Text).</p>
<p>Add to the top of the constructor<br />
parent::__construct(array()); ## add<br />
$this-&gt;_engine = new Smarty(); # as before</p>
<p>Since you are clling the parent - you also have to extend the original</p>
<p>require_once 'Zend/View.php';<br />
class AkCom_View_Smarty extends Zend_View implements Zend_View_Interface <em>....</em></p>
<p># It's also useful to change the AkCom_View_Smarty::__constructor default parameter to 'array()' (from: null), so it can be passed into the constructor unchanged<br />
parent::__construct($params); ## alternate</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lukas</title>
		<link>http://akrabat.com/zend-framework/extending-zend_view_interface-for-use-with-smarty/#comment-20835</link>
		<dc:creator>Lukas</dc:creator>
		<pubDate>Thu, 27 Mar 2008 14:53:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/12/23/extending-zend_view_interface-for-use-with-smarty/#comment-20835</guid>
		<description>Can you please do a tutorial for integrating Smarty in to Zend Framework? I&#039;m really confused of it. Everyone make it different, but non of the solution is working for me. Thanks</description>
		<content:encoded><![CDATA[<p>Can you please do a tutorial for integrating Smarty in to Zend Framework? I'm really confused of it. Everyone make it different, but non of the solution is working for me. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/zend-framework/extending-zend_view_interface-for-use-with-smarty/#comment-10475</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Wed, 06 Jun 2007 15:04:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/12/23/extending-zend_view_interface-for-use-with-smarty/#comment-10475</guid>
		<description>William,

Shouldn&#039;t do as Zend_Controller_Action_Helper_ViewRenderer is written against Zend_View_Interface.

You might need to check if Zend_View_Interface has changed since this was posted though!

Regards,

Rob...</description>
		<content:encoded><![CDATA[<p>William,</p>
<p>Shouldn't do as Zend_Controller_Action_Helper_ViewRenderer is written against Zend_View_Interface.</p>
<p>You might need to check if Zend_View_Interface has changed since this was posted though!</p>
<p>Regards,</p>
<p>Rob...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Graham</title>
		<link>http://akrabat.com/zend-framework/extending-zend_view_interface-for-use-with-smarty/#comment-10474</link>
		<dc:creator>William Graham</dc:creator>
		<pubDate>Wed, 06 Jun 2007 14:32:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/12/23/extending-zend_view_interface-for-use-with-smarty/#comment-10474</guid>
		<description>Rob, does anything about this change with the ViewRenderer in RC1 of the framework?

Thanks!
William</description>
		<content:encoded><![CDATA[<p>Rob, does anything about this change with the ViewRenderer in RC1 of the framework?</p>
<p>Thanks!<br />
William</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/zend-framework/extending-zend_view_interface-for-use-with-smarty/#comment-9743</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Mon, 07 May 2007 18:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/12/23/extending-zend_view_interface-for-use-with-smarty/#comment-9743</guid>
		<description>Sam,

Copy/paste error :) Good catch!

I&#039;ve updated.

Regards,

Rob...</description>
		<content:encoded><![CDATA[<p>Sam,</p>
<p>Copy/paste error :) Good catch!</p>
<p>I've updated.</p>
<p>Regards,</p>
<p>Rob...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel</title>
		<link>http://akrabat.com/zend-framework/extending-zend_view_interface-for-use-with-smarty/#comment-9735</link>
		<dc:creator>Samuel</dc:creator>
		<pubDate>Mon, 07 May 2007 11:18:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/12/23/extending-zend_view_interface-for-use-with-smarty/#comment-9735</guid>
		<description>Rob,

On the setCacheLifetime() function, you use $dir as the variable passing to Smarty, but you&#039;re defining it on the function call as $seconds.

--Sam</description>
		<content:encoded><![CDATA[<p>Rob,</p>
<p>On the setCacheLifetime() function, you use $dir as the variable passing to Smarty, but you're defining it on the function call as $seconds.</p>
<p>--Sam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob...</title>
		<link>http://akrabat.com/zend-framework/extending-zend_view_interface-for-use-with-smarty/#comment-9219</link>
		<dc:creator>Rob...</dc:creator>
		<pubDate>Mon, 09 Apr 2007 05:11:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/12/23/extending-zend_view_interface-for-use-with-smarty/#comment-9219</guid>
		<description>Hi Christian,

No reason why not. Just instantiate either a Zend_View or an AkCom_View_Smarty in the controller and and assign to $view before you call initView().

Regards,

Rob...</description>
		<content:encoded><![CDATA[<p>Hi Christian,</p>
<p>No reason why not. Just instantiate either a Zend_View or an AkCom_View_Smarty in the controller and and assign to $view before you call initView().</p>
<p>Regards,</p>
<p>Rob...</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cristian Bichis</title>
		<link>http://akrabat.com/zend-framework/extending-zend_view_interface-for-use-with-smarty/#comment-9215</link>
		<dc:creator>Cristian Bichis</dc:creator>
		<pubDate>Sun, 08 Apr 2007 23:35:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.akrabat.com/2006/12/23/extending-zend_view_interface-for-use-with-smarty/#comment-9215</guid>
		<description>Hello,

Rob, any idea if works fine for 0.9.x ?

Also, i am thinking that approach for making a new view based sub class is not the best idea when is needed to mix both ZF default view and Smarty view... I am wondering if is not possible to mix both on same class...</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Rob, any idea if works fine for 0.9.x ?</p>
<p>Also, i am thinking that approach for making a new view based sub class is not the best idea when is needed to mix both ZF default view and Smarty view... I am wondering if is not possible to mix both on same class...</p>
]]></content:encoded>
	</item>
</channel>
</rss>

