[TYPO3-english] Add Custom Class to menu all li tag

yogesh shishangiya shishangiya.yogesh at gmail.com
Tue Sep 2 14:23:21 CEST 2014


Hi ,

I create menu and its working successfully. now i want to add custom style to my every li of first level so i add class to like below. 

lib.header_top_right = COA
lib.header_top_right {
    10 = HMENU
    10 {
        wrap = <div class="menu-main-container">|</div>
        entryLevel = 0
        1 = TMENU
        1 {
        expAll = 1
            wrap =   <ul id="menu-main-1" class="main-nav">|</ul>
            target = _top
      NO {
         wrapItemAndSub = <li class="home">|</li>|*|<li class="service">|</li>|*|<li class="contact">|</li>|*|<li class="l">|</li>|*|<li class="about">|</li>
         stdWrap.wrap = <span class="nav-title">|</span><span class="hr"> </span>
        }
            ACT < .NO
            ACT = 1
            CUR < .NO
            CUR = 1
            CUR {
            stdWrap.wrap = <span class="nav-title">|</span><span class="hr"> </span>
        }
    }  
     
    2 = TMENU
        2 {
            expAll = 1
            wrap = <ul class='sub-hide'>|</ul>
            NO {
                wrapItemAndSub = <li>|</li>
            }
    }
    3 = TMENU
        3 {
            expAll = 1
            wrap = <ul class='sub-hide'>|</ul>
            target = _top
            NO {
                wrapItemAndSub = <li>|</li>
            }
    }
    }
}

But Problem occured first class of li apply to first and second apply to still before last. and last menu get third li tag class .. Can any one know right method for it ? what mistake i done ?


More information about the TYPO3-english mailing list