[TYPO3-dev] [**SPAM**] Re: access flexform values in typoscript
Kjeld Schumacher
ks at not-only-pixel.de
Tue May 8 09:59:22 CEST 2012
Ok, I installed the extension and changed my ts setup:
20 = NOPOWNCE
20 {
text = XPATH
text {
source.data = DB:tt_content:{field:uid}:pi_flexform
return = string
expression = //field[@index='normalText']/value
resultObj {
cObjNum = 1
1.current = 1
1.wrap = <p><em>|</em></p>
}
}
}
In my hook class I have:
$content = $this->cObj->stdWrap($conf['text'], $conf['text.']);
But as a return value I recieve "XPATH" as a string and not the text from
the flexform.
Even if I use a simple ts snippet like:
20 = NOPOWNCE
20 {
text = TEXT
text.value = foobar
}
The result is always TEXT. Did I miss something here?? It looks so simple
in the tutorial...
Thanks in advance!!!
> Hi Kjeld Schumacher,
>
> Kjeld Schumacher wrote:
>
>> Hi,
>> I am creating a new Content Element by my own (TYPO3 4.6.8). As a
>> reference I use following tutorial:
>> http://buzz.typo3.org/people/steffen-kamper/article/integrating-own-
> content-elements/
>>
>> Steffen adds a flexform file in step 3, until this point no problem for
>> me. In my flexform file I have multiple fields like RTE Textareas, etc.
>> and I want to know how to insert the flexform values inside my
>> typoscript
>> setup to render them by $this->cObj->stdWrap.
>>
>>
>> Does anyone have a link for me or a best practice example how to solve
>> this problem??
>
> Normally you would parse the Flexform in an extension, but there is an
> extension called "cobj_xpath" which lets you do what you want :)
>
> http://typo3.org/extension-manuals/cobj_xpath/1.1.1/view/1/4/#id547457
>
> Best regards
> --
> Philipp Gampe â PGP-Key 0AD96065 â TYPO3 UG Bonn/Köln
> Documentation â linkvalidator
> TYPO3 .... inspiring people to share!
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
More information about the TYPO3-dev
mailing list