[TYPO3-dev] levelfield inside HMENU item

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Mon May 30 10:42:21 CEST 2011


Am 27.05.2011 12:36, schrieb Thomas "Thasmo" Deinhamer:
> It seems that "levelfield" does _not_
> work when used inside a HMENU/TMENU item.

As Francois pointed out, levelmediaw
will always relate to the rootline, and
the rootline is always the rootline of
the current page, not the current menu item.

Fortunately for my case I _finally_ found a
nice solution; but it will only work if you
need to get the media field's value of the
parent page. It will not work if you wanna
have e.g. the media field of the grandparent page.

Here's the TS magic:

import {
   data = DB:pages:{field:pid}:media
   data.insertData = 1

   listNum = 1
}

It took me ages to get this, but finally it's done. :D
I guess that's one of the TS snippets I will never forget. :D

Best regards,
Thomas




More information about the TYPO3-dev mailing list