[TYPO3-english] Get current page ID in menu.

Christopher Torgalson bedlamhotel at gmail.com
Thu Oct 29 17:40:56 CET 2009


Hello again,

On Thu, Oct 29, 2009 at 9:18 AM, Radoslav Kolarov
<radoslav.kolarov at osceola.de> wrote:
> Hi Christopher,
>
> Thanks for you suggests. I found also that if you do not specify
> special.value the default value is current page. For the entryLevel - yes it
> is not needed. Thanks.
> For menu code - I need this subpages menu in other place than main
> menu(where the subpages are also there with ajax code). So thats why I need
> this menu as separate lib.


Ah, ok. I'm not positive I understand your specific implementation,
but if it's working then that's good :)

Besides that, my example code contained an obvious error
(@#$!%^#$^%!), so for anyone searching this thread in the list
archives, this code should be correct:


lib.some_menu = HMENU
lib.some_menu {
 special = directory
 # Change special.value below to the uid of some page in the site (or
use stdWrap...)
 special.value = 54

 1 = TMENU
 1 {
   noBlur = 1
   wrap = <ul id="some-menu">|</ul>

   NO {
     wrapItemAndSub = <li>|</li>
   }

   CUR = 1
   CUR {
     ATagParams = class="current"
   }
 }

 2 < .1
 2.wrap = <ul>|</ul>

 3 < .2
}


-- 
Christopher Torgalson
http://www.typo3apprentice.com/


More information about the TYPO3-english mailing list