[TYPO3] Retrieving RECORD bodycontent via TS?
JoH asenau
info at cybercraft.de
Fri Mar 23 00:39:28 CET 2007
> I'm trying to retrieve a specific record from tt_content, and echo one
> part of it -- the bodytext -- on another page via TypoScript.
>
> Can someone explain to me why this doesn't do that? (Assume that the
> uid of the content-item I'm trying to retrieve is 1.)
>
> lib.contentGoesHere = RECORDS
> lib.contentGoesHere.tables = tt_content
> lib.contentGoesHere.source = 1
> lib.contentGoesHere.source.field = bodytext
>
> If I leave off the last line, I can retrieve the entire content item;
> but I don't want the header, just the body text. I can't find a way
> to get at just that part of the record, though.
>
> I tried this alternative approach:
>
> lib.contentGoesHere = HTML
> lib.contentGoesHere.value.data = DB : tt_content:1:bodytext
>
> ... and that brings back the bodytext content -- but without its
> embedded HTML markup, just the plain text. And I need the markup.
Try using conf
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.0.0/view/8/10/
If you don't create your own conf.tt_content, the default setup for
tt_content will be used instead and this is what you want to get rid of.
lib.contentGoesHere = RECORDS
lib.contentGoesHere {
tables = tt_content
source = 1
conf.tt_content = TEXT
conf.tt_content {
field = bodytext
parseFunc < lib.parseFunc_RTE
}
}
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