<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: PHPTAL - taking the step up from smarty</title>
	<link>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/07/17/phptal-taking-the-step-up-from-smarty/</link>
	<description>web application development with popular technologies</description>
	<pubDate>Tue, 02 Dec 2008 08:30:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>

	<item>
		<title>by: judas_iscariote</title>
		<link>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/07/17/phptal-taking-the-step-up-from-smarty/#comment-5742</link>
		<pubDate>Wed, 23 Aug 2006 01:18:56 +0000</pubDate>
		<guid>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/07/17/phptal-taking-the-step-up-from-smarty/#comment-5742</guid>
					<description>also, PHPTAL is XSS safe by default , that will save you a lot of validation ;-)</description>
		<content:encoded><![CDATA[<p>also, PHPTAL is XSS safe by default , that will save you a lot of validation <img src='http://www.melbournechapter.net/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Richard Lee</title>
		<link>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/07/17/phptal-taking-the-step-up-from-smarty/#comment-3301</link>
		<pubDate>Fri, 21 Jul 2006 09:09:49 +0000</pubDate>
		<guid>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/07/17/phptal-taking-the-step-up-from-smarty/#comment-3301</guid>
					<description>Yeah, some of the Smarty code got stripped so had to go do a db edit...I agree,when one of us gets a moment we need to look at whats happening with our code plugin</description>
		<content:encoded><![CDATA[<p>Yeah, some of the Smarty code got stripped so had to go do a db edit&#8230;I agree,when one of us gets a moment we need to look at whats happening with our code plugin
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Cameron Manderson</title>
		<link>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/07/17/phptal-taking-the-step-up-from-smarty/#comment-3296</link>
		<pubDate>Fri, 21 Jul 2006 07:09:35 +0000</pubDate>
		<guid>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/07/17/phptal-taking-the-step-up-from-smarty/#comment-3296</guid>
					<description>Hmm the HTML has been stripped. We really have to fix that.</description>
		<content:encoded><![CDATA[<p>Hmm the HTML has been stripped. We really have to fix that.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Cameron Manderson</title>
		<link>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/07/17/phptal-taking-the-step-up-from-smarty/#comment-3293</link>
		<pubDate>Fri, 21 Jul 2006 07:09:02 +0000</pubDate>
		<guid>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/07/17/phptal-taking-the-step-up-from-smarty/#comment-3293</guid>
					<description>I think we are missing some code here, smarty would have a lot more code if it was complete, something like:
&lt;table&gt;
&lt;tr&gt;
{foreach item="item" from=$myItems}
&lt;td&gt;{$item}&lt;/td&gt;
{/foreach}
&lt;/tr&gt;
&lt;/table&gt;

:)</description>
		<content:encoded><![CDATA[<p>I think we are missing some code here, smarty would have a lot more code if it was complete, something like:</p>
<table>
<tr>
{foreach item=&#8221;item&#8221; from=$myItems}</p>
<td>{$item}</td>
<p>{/foreach}<br />
</tr>
</table>
<p>:)
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Richard Lee</title>
		<link>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/07/17/phptal-taking-the-step-up-from-smarty/#comment-3287</link>
		<pubDate>Fri, 21 Jul 2006 04:45:32 +0000</pubDate>
		<guid>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/07/17/phptal-taking-the-step-up-from-smarty/#comment-3287</guid>
					<description>&lt;p&gt;Hmmm just had a read of the PHPTAL site, this idea of moving template actions into XHTML attributes is VERY appealing... My biggest beef with Smarty is the need to add in these "extra" template constructs, i.e. &lt;code&gt;{if $error ne &#34;&#34;}&lt;/code&gt; outside of the HTML so to speak. Tell me if I'm wrong but there's this tendency to add complex logic to the templates through these constructs!?.&lt;/p&gt;
&lt;p&gt;Here's some quick examples of printing a dynamic table using PHP, Smarty and finally PHPTAL. Which do you prefer?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PHP&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;br /&gt;
&#60;table&#62;&lt;br /&gt;
&#60;?php&lt;br /&gt;
foreach($myItems as $item){&lt;br /&gt;
  echo &#039;&lt;br /&gt;
  &#60;tr&#62;&lt;br /&gt;
    &#60;td&#62;&#039;.$item.&#039;&#60;/td&#62;&lt;br /&gt;
  &#60;/tr&#62;&#039;;&lt;br /&gt;
?&#62;&lt;br /&gt;
&#60;/table&#62;&lt;br /&gt;
&#160;&lt;br /&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Smarty&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;br /&gt;
&#160;&lt;br /&gt;
&#60;table&#62;&lt;br /&gt;
{foreach item=&#34;item&#34; from=$myItems}&lt;br /&gt;
  &#60;tr&#62;&lt;br /&gt;
    &#60;td&#62;{$item}&#60;/td&#62;&lt;br /&gt;
  &#60;/tr&#62;&lt;br /&gt;
{/foreach}&lt;br /&gt;
&#60;/table&#62;&lt;br /&gt;
&#160;&lt;br /&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;PHPTAL&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;br /&gt;
&#160;&lt;br /&gt;
&#60;table&#62;&lt;br /&gt;
&#60;tr tal:repeat=&#34;item myItems&#34;&#62;&lt;br /&gt;
&#60;td tal:content=&#34;item&#34;&#62;&#60;/td&#62;&lt;br /&gt;
&#60;/tr&#62;&lt;br /&gt;
&#60;/table&#62;&lt;br /&gt;
&#160;&lt;br /&gt;
&lt;/pre&gt;
&lt;p&gt;I think I just answered my previous post!&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Hmmm just had a read of the PHPTAL site, this idea of moving template actions into XHTML attributes is VERY appealing&#8230; My biggest beef with Smarty is the need to add in these &#8220;extra&#8221; template constructs, i.e. <code>{if $error ne &quot;&quot;}</code> outside of the HTML so to speak. Tell me if I&#8217;m wrong but there&#8217;s this tendency to add complex logic to the templates through these constructs!?.</p>
<p>Here&#8217;s some quick examples of printing a dynamic table using PHP, Smarty and finally PHPTAL. Which do you prefer?</p>
<p><strong>PHP</strong></p>
<pre>
&lt;table&gt;
&lt;?php
foreach($myItems as $item){
  echo &#039;
  &lt;tr&gt;
    &lt;td&gt;&#039;.$item.&#039;&lt;/td&gt;
  &lt;/tr&gt;&#039;;
?&gt;
&lt;/table&gt;
&nbsp;
</pre>
<p><strong>Smarty</strong></p>
<pre>
&nbsp;
&lt;table&gt;
{foreach item=&quot;item&quot; from=$myItems}
  &lt;tr&gt;
    &lt;td&gt;{$item}&lt;/td&gt;
  &lt;/tr&gt;
{/foreach}
&lt;/table&gt;
&nbsp;
</pre>
<p><strong>PHPTAL</strong></p>
<pre>
&nbsp;
&lt;table&gt;
&lt;tr tal:repeat=&quot;item myItems&quot;&gt;
&lt;td tal:content=&quot;item&quot;&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&nbsp;
</pre>
<p>I think I just answered my previous post!</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Richard Lee</title>
		<link>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/07/17/phptal-taking-the-step-up-from-smarty/#comment-3286</link>
		<pubDate>Fri, 21 Jul 2006 04:14:15 +0000</pubDate>
		<guid>http://www.melbournechapter.net/wordpress/programming-languages/php/cman/2006/07/17/phptal-taking-the-step-up-from-smarty/#comment-3286</guid>
					<description>ARGH! So am I waisting my time working with Smarty?</description>
		<content:encoded><![CDATA[<p>ARGH! So am I waisting my time working with Smarty?
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
