[TYPO3] Retrieving RECORD bodycontent via TS?

Tyler Kraft headhunterxiii at yahoo.ca
Thu Mar 22 19:48:31 CET 2007


It doesn't work because the syntax is completely wrong!

Go look at TSref to see what values should be used for the RECORDS 
cObject. You'll find that its for getting a specific record forma table 
- not for getting part of a record. You need to use the Content cObject 
and then define your own redering for it.





Jason A. Lefkowitz wrote:
> 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.
> 
> What am I missing?
> 
> -- Jason Lefkowitz


More information about the TYPO3-english mailing list