[TYPO3-templavoila] Passing FCE field value to userFunc as parameter

Frédéric Ollivier lordef at gmail.com
Fri Mar 20 10:05:16 CET 2009


Thanks for this.
I hoped it was easy because I can access this data with this TS :

200 = TEXT
200.field = SKU

Then SKU is displayed for each FCE.

But no way to pass it to userFunc…

Any way, thanks for your help

Fredol

2009/3/20 Steffen Kamper <info at sk-typo3.de>

> Hi,
>
> Frédéric Ollivier schrieb:
> > Hi all,
> > I'm new to this list and quite a newbie in TV so forgive me in advance if
> > the answer is too obvious.
> >
>
> welcome ;-)
>
>
> > I've created a FCE with a field named SKU.
> >
> > In FE, I need to display an image based on this SKU.
> >
> > I thought I could access SKU field using TypoScript in my Setup and pass
> it
> > to a userFunc but this does not work.
> >
> > Here's my setup :
> >
> > 100 = USER 100 {
> >   userFunc = user_functions->showBadge
> >   SKUvalue.field = SKU
> > }
> >
> > showBadge returns HTML code depending if stock for SKU is not empty.
> >
> > Is this the good way ?
> >
> > Thanks for your help
> >
>
> when you use TS, the fields you have are from current record, and this
> is the page record. Wen you are in page module of TV, use the page icon,
> context menu, View: Flexform XML. This is the way TV saves the data to
> the page, it's in the field tx_templavoila_flex.
>
> When you use a userfunc, you should point to this data. There is an
> extension called best_getflexfield which ables you to use some xpath -
> syntax in TS, but some you have to do in the userfunc.
>
> Also have a look to TV api, which is included in the extension, there
> are a lot of functions for extracting the content.
>
> I would like to say that's easy, but unfortunally it's not.
>
> vg Steffen
> _______________________________________________
> TYPO3-project-templavoila mailing list
> TYPO3-project-templavoila at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/
> typo3-project-templavoila
>


More information about the TYPO3-project-templavoila mailing list