[TYPO3-english] Menu with images from page resources

Jan Bednarik info at bednarik.org
Thu Nov 21 08:07:52 CET 2013


This works:

1.NO.stdWrap.override.cObject = FILES
     1.NO.stdWrap.override.cObject {
       references {
         table = pages
         uid.field = uid
         fieldName = media
       }
       renderObj = COA
       renderObj {
         10 = IMAGE
         10 {
           file.import.data = file:current:publicUrl
         }
       }
     }

Is it OK like that? Isn't there a better way? This looks like at least 
one extra query is needed for each page in the menu.

Jan

Dne 21.11.2013 0:20, Jan Bednarik napsal(a):
> Hi all,
>
> what's the correct way in 6.1 to display images from page resources in a
> menu?
>
> I tried this:
>
>      1.NO.stdWrap.override.cObject = IMAGE
>      1.NO.stdWrap.override.cObject {
>        #file.import.data = levelmedia: -1,slide
>        file.treatIdAsReference = 1
>        file.import.listNum = 0
>        file.import.field = media
>        altText.data = field:title
>      }
>
> but nothing's working so far.
>
> When I output field = media, I get ../../fileadmin/something, and when I
> try to put it into import (file.import.field = media) it doesn't work
> (which I expected because of ../../ at the beginning).
>
> So what's the correct way?
>
> Thanks
>
> Jan



More information about the TYPO3-english mailing list