[TYPO3-content-rendering] Textpic: How to render image and text separately

Ernesto Baschny [cron IT] ernst at cron-it.de
Sat Jan 28 00:51:27 CET 2006


On 27.01.2006 20:36, John Angel wrote:

> Does anybody have solution how to render image and text separately?
> 
> The example below doesn't work, because I couldn't find the way to
> temporarily change rendering of tt_content...
> 
> # Gimme text
> tt_content.textpic >
> tt_content.textpic < tt_content.text
> lib.content < styles.content.get
> 
> # Gimme image
> tt_content.textpic >
> tt_content.textpic < tt_content.image.20
> lib.image < styles.content.get

You can specify a root-object in TypoScript that will render a CONTENT
cObject (see
http://typo3.org/documentation/document-library/doc_core_tsref/CONTENT/).
styles.content.get is just a CONTENT cObject. So you might want to try:

# Gimme text
tt_content_text < tt_content.text
lib.content < styles.content.get
lib.content.renderObj =< tt_content_text

# Gimme image
tt_content_image < tt_content.image.20
lib.image < styles.content.get
lib.image.renderObj =< tt_content_image

Untested!

But I'm not sure what you are trying to acomplish here. CONTENT will
return all records for the current page, so this will render all images
of all content elements in lib.image (one after the other) and all
bodytext content into lib.content.

Cheers,
Ernesto



More information about the TYPO3-project-content-rendering mailing list