[TYPO3] Minimal TS code to pull IMAGE from tt_content.image?

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Feb 23 21:18:09 CET 2006


Martin Bless schrieb am 23.02.2006 18:33:

> I want to render a  tt_content.textpic object differently. What I
> don't understand and I'm not achieving yet:
> 
> Instead of pulling an image from a file, as in
> 
> temp.1 = IMAGE
> temp.1.file = fileadmin/img/cool.jpg
> 
> I want to pull the first image from the tt_content.image field, that
> is to say (WANTED):
> 
> temp.1 = IMAGE
> temp.1.file = [ give me first image of current tt_content.image ]
> 
> Is that possible? What's the minimal TS code?

Here is an example:

tt_content.textpic >
tt_content.textpic = COA
tt_content.textpic.10 = TEXT
tt_content.textpic.10.value = The image:
tt_content.textpic.20 = IMAGE
tt_content.textpic.20.file.import.field = image
tt_content.textpic.20.file.import.listNum = 0
tt_content.textpic.20.file.import.wrap = uploads/pics/|

> Maybe the problem is that I simply don't understand the code in
> styles.content.imgtext which starts like this:
> 
> styles.content.imgtext = IMGTEXT
> styles.content.imgtext {
>   imgList.field = image
> ....

This "imgList" is used in the IMGTEXT code, so if you don't want to use
"IMGTEXT", you have to use other TypoScript methods (imgResources). See
TSRef for more details.

> What does "current" do?

What "current"?

Cheers,
Ernesto



More information about the TYPO3-english mailing list