[TYPO3-dev] Moving the topic of the discussion a little bit -- Based of thread "Change roadmap..."
Dimitri Tarassenko
mitka at mitka.us
Thu Apr 13 22:13:11 CEST 2006
Ernesto,
On 4/13/06, Ernesto Baschny [cron IT] <ernst at cron-it.de> wrote:
> > 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
> ....
> }
Actually, it is an interface to cObject, but not an image but COA,
that's why I have "5"s in the sample. I thought about creating a
separate wrapper for all object types and then translating the
parameters from Smarty function call to the TS, but then considered
how many parameters are there I decided to leave it as is for a while
and see what it is mostly used for. So far I have only used it as the
easiest way to tap into IMAGE and GIFBUILDER objects, but there may be
other uses.
> 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.
Yes, there is an optional parameter in this function for that, but
since Smarty does substitution of $-variables in the function
parameters before calling the function anyway it was a lot easier to
do it this way in this particular case.
--
Dimitri Tarassenko
More information about the TYPO3-dev
mailing list