[TYPO3] Retrieving RECORD bodycontent via TS?

JoH asenau info at cybercraft.de
Fri Mar 23 00:50:14 CET 2007


>> Or you can apply the
>> stdWrap and then parseFunc to your HTML like this:
>>
>> lib.contentGoesHere.conf.tt_content = HTML
>> lib.contentGoesHere.conf.tt_content.value.field = bodytext
>> lib.contentGoesHere.conf.tt_content.value.parseFunc < lib.parseFunc
>
> What do you know, that works!  Thanks.  I will now diligently go to
> the parseFunc section of the TSRef to try and understand why.

It's not very hard to understand.
If you install CSS-styled-content, there will be two predefined sections
lib.parseFunc and lib.parseFunc_RTE which are responsible for parsing the
content of text fields like i.e. bodytext. They will add and/or strip
linebreaks, HTML code and other stuff, they will create the links out of
URLs, E-Mail adresses and <link> tags and so on.

Just for your personal comfort they are created as resident "lib" and not
"temp" elements, so you can recycle them within your own TS setup.

Something like

10 = TEXT
10.field = bodytext
10.parseFunc < lib.parseFunc RTE

will render the content of the bodytext field exactly like it is done in
default "text" or "text w/image" elements.

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com




More information about the TYPO3-english mailing list