[TYPO3-ect] lib/div 1.0 - it's time to say thank you
R. van Twisk
typo3 at rvt.dds.nl
Tue Jan 9 15:23:27 CET 2007
Steffen Kamper wrote:
> "Jochen Rieger" <j.rieger at connecta.ag> schrieb im Newsbeitrag
> news:mailman.1.1168340287.22754.typo3-team-extension-coordination at lists.netfielders.de...
>
>> Hi all,
>>
>>
>>> -1 for Smarty.
>>>
>> I agree with Cyprian. What I mainly didn't like about SMARTY is that you
>> are tempted to put a lot of logic (even PHP functions) into the templates.
>>
>
> not in general :-) The easiest way of a smarty template is that you have
> markers like
> {$name}
> instead of the "normal" TYPO3-Marker
> ###NAME###
>
> So you don't have to know something about the logic.
>
> The good thing is, that you can implement some logic into:
> {if $name=""} I don't find a name to this subjsct {/if}
>
> which makes it easy instead of writing complicate stdWrap-Constructs with
> TS.
>
> You also have the possibility to integrate language vars from the
> locallang.xml like
> {getLL}archiveItems{/getLL}
>
> In my opinion the syntax is easy. If there are some programmers want make
> more complex solutions, they can do, cause smarty is really powerful.
>
> The second thing is that smarty can handle loops, so this part hasn't to be
> coded in extension, you only have to fill an array - next +1 :-)
>
> At the end there will be several opinions the user can switch to:
> - php template
> - smarty template
> - may be more coming ...
>
> vg Steffen
>
>
For me +1 for smarty.
With smarty my PHP code get's much smaller in comparison with typo3
template method.
Apart from the above mentioned feature by Steffen I can do thing like this:
{section name=row loop=$items}
<div class="test{cycle values="0,0,1,1" }">
So I can make colored background rows, which perfectly fit's into
a div/css model. Since it is presentation data I think it should be in
there,
and not as a option (like tt_news) to tell the business model how to
represent data.
I can also do number formatting, calculations and other nice to have
options.
I never used phpcode in my templates (for good reasons) and for me it's
not tempting
to do so, however using smarty above typo3 template system IS tempting since
typo3 templating is a bit a pain in the ass** when creating loops, rows
colored/alternating
backgrounds etc... it's just much more work.
I do agree that a TV mapping system would be really cool (which might
generate smarty???)
however I think that smarty is simple enough for the non-tech person to
understand,
also a TV style mapping can be created at a later stage.
Ries
More information about the TYPO3-team-extension-coordination
mailing list