[TYPO3-english] Problem with CONTENT

Tapio Markula tapio.markula at xetpoint.fi
Fri Nov 28 16:39:05 CET 2008


JoH asenau kirjoitti:
>> This doesn't
>>
>> 20 = CONTENT
>>     20 {
>>
>>       table=pages
>>       select {
>>         where = hidden=0
>>         pidInList.field = uid
>>         #max=1
>>       }
>>       renderObj = IMAGE
>>       renderObj {
>>         file.import=uploads/media/
>>         file.import.field=media
>>
>> I put certain page an image to the media field. I just don't
>> understand why the latter doesn't work - no image fetched
> 
> pidInList.field = uid
> 
> While this is OK for tt_content records of the current page, it doesn't help 
> very much here, since you don't want to get media from a subpage of the 
> current page but the current page itself. Even pidInList.field = pid 
> wouldn't help very much, because there might be other siblings of the 
> current page.
> 
> So IMHO it would be better to use a pure IMAGE element with data from the 
> current page record instead:
> 
> 20 = IMAGE
> 20 {
>        file.import=uploads/media/
>        file.import.data = page:media
> }
> 
> This way you will get content from the media field of the current page and I 
> guess this is what you wanted.

Didn't work exactly that way  - this worked
  20 = IMAGE
     20 {
        file.import.field=media
        file.import=uploads/media/
        file.width = 270c
        wrap = |</a></div></td></tr><tr>
     }

file.import.data = page:media didn't work but just the same as before 
(file.import.field=media)

Thank's anyway pointing to the correct direction and getting the correct 
result. :)


More information about the TYPO3-english mailing list