[TYPO3-dev] Moving the topic of the discussion a little bit -- Based of thread "Change roadmap..."
Ernesto Baschny [cron IT]
ernst at cron-it.de
Thu Apr 13 10:57:58 CEST 2006
Dimitri Tarassenko schrieb am 12.04.2006 22:01:
> This is an actual Smarty template that I did two weeks ago:
> [..]
> {foreach from=$members item=member}
> {strip}
> <div class="member">
> <div class="member-logo">
> {if $member.tx_memberdb_logo!=''}
> {assign var=logofile
> value=$member.tx_memberdb_logo}
> {assign var=logoalt value=$member.companyname}
> {typo3_render_typoscript ts="
> 5 = IMAGE
> 5.file=uploads/tx_memberdb/$logofile
> 5.file.width=100
> 5.alttext = $logoalt
> "}
> {/if}
> </div>
>
> From my discussion with Thomas Murphy I understand that you may expect
> this to be available in the next release of smarty extension.
I've never thought about that direction (integrating TS in Smarty).
Interesting and easier to integrate. But I'm not convinced if this is
the "way to go" yet. We probably will be able to see this clearer once
its published.
In this approach, a cleanear way in my opinion would be to provide an
interface similar to cObject in Smarty. Instead of:
{typo3_render_typoscript ts="
5 = IMAGE
5.file=uploads/tx_memberdb/$logofile
....
}
I would rather do something like:
{tslib_cObj->IMAGE row=$member conf="
file=uploads/tx_memberdb/$logofile
....
}
Which makes it clear that we are rendering content objects in Smarty.
Also you could load the current Smarty-row as the current row in the
cObject, thus have all fields from that row available in your TypoScript.
Cheers,
Ernesto
More information about the TYPO3-dev
mailing list