[TYPO3-english] Custom class in tmenu according to uid page

Victor Livakovsky v-tyok at mail.ru
Mon Feb 22 14:06:10 CET 2010


> Hello,
>
> I would like to put a specific class according to the uid from the page.
>
> My menu should look like this:
> <div class="corporate"></div> # Corporate
> <div class="hr"></div> # HR
> <div class="knowledge"></div> # Knowledge
> ..
>
> My typoscript:
> temp.myMenu = HMENU
> temp.myMenu .1 = TMENU
> temp.myMenu .1 {
>  NO.linkWrap = <div class="???"></div>|
> }
>
> Thanks for helping me to fill in the "???" ! Marieke

Hi.

You may try to play with cObject of menu item:
temp.myMenu = HMENU
temp.myMenu .1 = TMENU
temp.myMenu .1 {
  NO.allWrap.cObject = CASE
  NO.allWrap.cObject {
    key = id
    default = TEXT
    default.value =  <div class="default"> | </div>
    # id of 'Corporate' page
    23 = TEXT
    23.value = <div class="corporate">|</div>
    ...
  }
}

I've not tried this snippet, but at least you now have point to start with 
;) 



More information about the TYPO3-english mailing list