<?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: Zend Framework: Using Smarty as template engine</title>
	<atom:link href="http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/feed/" rel="self" type="application/rss+xml" />
	<link>http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/</link>
	<description>In my blog I'll try to describe about interesting technologies, my discovery in IT and some useful things about programming.</description>
	<lastBuildDate>Tue, 29 Dec 2009 10:34:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: strip club list</title>
		<link>http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-276456</link>
		<dc:creator>strip club list</dc:creator>
		<pubDate>Fri, 12 Mar 2010 19:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-276456</guid>
		<description>I&#039;m against this method of incorporating smarty into ZF. This method assumes you will be rendering a smarty view with each action.

Also... this will produce an error with current versions on ZF that automatically render a view at the end of an action. With this method you must call $this-&gt;_helper-&gt;viewRenderer-&gt;setNoRender(true) in every action to disable zend from attempting to render a default view after the smarty display.</description>
		<content:encoded><![CDATA[<p>I&#8217;m against this method of incorporating smarty into ZF. This method assumes you will be rendering a smarty view with each action.</p>
<p>Also&#8230; this will produce an error with current versions on ZF that automatically render a view at the end of an action. With this method you must call $this-&gt;_helper-&gt;viewRenderer-&gt;setNoRender(true) in every action to disable zend from attempting to render a default view after the smarty display.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rate pics</title>
		<link>http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-276454</link>
		<dc:creator>rate pics</dc:creator>
		<pubDate>Fri, 12 Mar 2010 19:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-276454</guid>
		<description>This is a little outdated...

It works... but instead of using Zend::register(&#039;smarty&#039;, $smarty) you should use Zend_Registry::set(&#039;smarty&#039;, $smarty) and instead of using Zend::registry(&#039;smarty&#039;) you should use Zend_Register::get(&#039;smarty&#039;). And ofcourse you must: require_once &#039;Zend/Registry.php&#039; in the bootstrap.</description>
		<content:encoded><![CDATA[<p>This is a little outdated&#8230;</p>
<p>It works&#8230; but instead of using Zend::register(&#8217;smarty&#8217;, $smarty) you should use Zend_Registry::set(&#8217;smarty&#8217;, $smarty) and instead of using Zend::registry(&#8217;smarty&#8217;) you should use Zend_Register::get(&#8217;smarty&#8217;). And ofcourse you must: require_once &#8216;Zend/Registry.php&#8217; in the bootstrap.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zendrej</title>
		<link>http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-275046</link>
		<dc:creator>zendrej</dc:creator>
		<pubDate>Fri, 12 Mar 2010 12:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-275046</guid>
		<description>I could not find &#039;zend.php&#039; and failed to include this. I would be thankful if anyone can help me

The below index.phtml is not rendering values too

&lt;code lang=&quot;php&quot;&gt;
&lt;?=$this-&gt;val?&gt;
&lt;/code&gt;

Regards,
rej</description>
		<content:encoded><![CDATA[<p>I could not find &#8216;zend.php&#8217; and failed to include this. I would be thankful if anyone can help me</p>
<p>The below index.phtml is not rendering values too</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">val</span><span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Regards,<br />
rej</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Getting started: Smarty View and first unit-tests &#124; Quality matters</title>
		<link>http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-248378</link>
		<dc:creator>Getting started: Smarty View and first unit-tests &#124; Quality matters</dc:creator>
		<pubDate>Fri, 12 Mar 2010 19:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-248378</guid>
		<description>[...] are number of Smarty_View implementations (see here, here, here and here). Personally I prefer combination of Zend&#8217;s example (see ZF manual) with some tweaks to read [...]</description>
		<content:encoded><![CDATA[<p>[...] are number of Smarty_View implementations (see here, here, here and here). Personally I prefer combination of Zend&#8217;s example (see ZF manual) with some tweaks to read [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: phpnoise</title>
		<link>http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-241996</link>
		<dc:creator>phpnoise</dc:creator>
		<pubDate>Fri, 12 Mar 2010 19:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-241996</guid>
		<description>&lt;strong&gt;Integrating Smarty with the Zend Framework...&lt;/strong&gt;

Ralf Eggert wrote:

&quot; Inspired by this article I started to play around a bit to integrate the Smarty template engine into the Zend Framework. My ambition was to minimize the required code in the controller actions but stay close to the given Zend_V...</description>
		<content:encoded><![CDATA[<p><strong>Integrating Smarty with the Zend Framework&#8230;</strong></p>
<p>Ralf Eggert wrote:</p>
<p>&#8221; Inspired by this article I started to play around a bit to integrate the Smarty template engine into the Zend Framework. My ambition was to minimize the required code in the controller actions but stay close to the given Zend_V&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: clockworkbird</title>
		<link>http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-241963</link>
		<dc:creator>clockworkbird</dc:creator>
		<pubDate>Fri, 12 Mar 2010 16:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-241963</guid>
		<description>Использование Smarty целесообразно только в случае переноса готового проекта, использующего Smarty на ZF. Если говорить о новом проекте, то используйте Zend_Layout и Zend_View и забудьте о &quot;лучшем шаблонном движке для PHP в мире&quot;. Безусловно Смарти таковым и является, но при использовании ZF необходимость в нем просто отпадает.</description>
		<content:encoded><![CDATA[<p>Использование Smarty целесообразно только в случае переноса готового проекта, использующего Smarty на ZF. Если говорить о новом проекте, то используйте Zend_Layout и Zend_View и забудьте о &#8220;лучшем шаблонном движке для PHP в мире&#8221;. Безусловно Смарти таковым и является, но при использовании ZF необходимость в нем просто отпадает.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arbol</title>
		<link>http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-231487</link>
		<dc:creator>arbol</dc:creator>
		<pubDate>Fri, 12 Mar 2010 22:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-231487</guid>
		<description>Hi Amit Shah, I found this solution at &lt;a href=&quot;http://www.smarty.net/manual/en/advanced.features.php#advanced.features.objects&quot; rel=&quot;nofollow&quot;&gt;Advanced Features/Objects&lt;/a&gt;, may be it will be useful for you.

I register the php object with an smarty method

[cc lang=&quot;php&quot;]
// registering the object (will be by reference)
$smarty-&gt;register_object(&#039;foobar&#039;,$myobj);
[/cc]

and then use it on .tpl file like this

[cc lang=&quot;smarty&quot;]
{foobar-&gt;method}
[/cc]

Bye</description>
		<content:encoded><![CDATA[<p>Hi Amit Shah, I found this solution at <a href="http://www.smarty.net/manual/en/advanced.features.php#advanced.features.objects" rel="nofollow">Advanced Features/Objects</a>, may be it will be useful for you.</p>
<p>I register the php object with an smarty method</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">// registering the object (will be by reference)</span><br />
<span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">register_object</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'foobar'</span><span style="color: #339933;">,</span><span style="color: #000088;">$myobj</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>and then use it on .tpl file like this</p>
<div class="codecolorer-container smarty twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="smarty codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #D36900;">&#123;</span>foobar-<span style="color: #D36900;">&gt;</span>method<span style="color: #D36900;">&#125;</span></div></td></tr></tbody></table></div>
<p>Bye</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit Shah</title>
		<link>http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-219404</link>
		<dc:creator>Amit Shah</dc:creator>
		<pubDate>Fri, 12 Mar 2010 13:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-219404</guid>
		<description>How could I pass form element with server side validation functions through smarty?

&lt;code lang=&quot;php&quot;&gt;
$this-&gt;setName(&#039;frmDrawing&#039;);
$this-&gt;setName(&#039;frmDrawing&#039;);
$this-&gt;setView(new Zend_View()); 
		$this-&gt;getView()-&gt;headScript()-&gt;appendFile(&#039;/zenddemo/public/js/Zend/Form.js&#039;); 
		
$id = new Zend_Form_Element_Hidden(&#039;id&#039;);
$name = new Zend_Form_Element_Text(&#039;name&#039;);
$drawing_name-&gt;setLabel(&#039;Drawing Name&#039;)
		   -&gt;setRequired(true)
		   -&gt;addFilter(&#039;StripTags&#039;)
		   -&gt;addFilter(&#039;StringTrim&#039;)
		   -&gt;addValidator(&#039;NotEmpty&#039;);
		   
$submit = new Zend_Form_Element_Submit(&#039;submit&#039;);
$submit-&gt;setAttrib(&#039;id&#039;, &#039;submitbutton&#039;);
		$this-&gt;addElements(array($id, $name, $submit));
&lt;/code&gt;

With default template we can create form element in model and we can pass to template.

&lt;code lang=&quot;php&quot;&gt;
&lt;?php echo $this-&gt;form ;?&gt;
&lt;/code&gt;

Through above code we can show compete form and on submit method we can also check server validation which we provide in model declaration.

Is any similar way available through smarty? from where we can directly assign server validation function in model and on submit it will execute that function and return appropriate value.

Thanks</description>
		<content:encoded><![CDATA[<p>How could I pass form element with server side validation functions through smarty?</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'frmDrawing'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'frmDrawing'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setView</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Zend_View<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getView</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">headScript</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">appendFile</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/zenddemo/public/js/Zend/Form.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
<span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Form_Element_Hidden<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$name</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Form_Element_Text<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$drawing_name</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setLabel</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Drawing Name'</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">-&gt;</span><span style="color: #004000;">setRequired</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">-&gt;</span><span style="color: #004000;">addFilter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'StripTags'</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">-&gt;</span><span style="color: #004000;">addFilter</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'StringTrim'</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #339933;">-&gt;</span><span style="color: #004000;">addValidator</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'NotEmpty'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
<span style="color: #000088;">$submit</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Zend_Form_Element_Submit<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'submit'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$submit</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setAttrib</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'id'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'submitbutton'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addElements</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$name</span><span style="color: #339933;">,</span> <span style="color: #000088;">$submit</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>With default template we can create form element in model and we can pass to template.</p>
<div class="codecolorer-container php twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">form</span> <span style="color: #339933;">;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Through above code we can show compete form and on submit method we can also check server validation which we provide in model declaration.</p>
<p>Is any similar way available through smarty? from where we can directly assign server validation function in model and on submit it will execute that function and return appropriate value.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHP Framework Resource Guide &#171; Ammasajan&#8217;s Weblog</title>
		<link>http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-216533</link>
		<dc:creator>PHP Framework Resource Guide &#171; Ammasajan&#8217;s Weblog</dc:creator>
		<pubDate>Fri, 12 Mar 2010 10:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-216533</guid>
		<description>[...] Using Smarty as template engine [...]</description>
		<content:encoded><![CDATA[<p>[...] Using Smarty as template engine [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Rusev Blog about web development and graphic design &#187; Blog Archive &#187; Loading Smarty on Demand in Zend Framework</title>
		<link>http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-214538</link>
		<dc:creator>Martin Rusev Blog about web development and graphic design &#187; Blog Archive &#187; Loading Smarty on Demand in Zend Framework</dc:creator>
		<pubDate>Fri, 12 Mar 2010 20:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/#comment-214538</guid>
		<description>[...] in Zend Framework and i search through the web to find proper resolution for my problem. I found this article and another one inspired by the first. I tested both approaches but they were not what i [...]</description>
		<content:encoded><![CDATA[<p>[...] in Zend Framework and i search through the web to find proper resolution for my problem. I found this article and another one inspired by the first. I tested both approaches but they were not what i [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
