开发者

Menu status CUR not working

开发者 https://www.devze.com 2023-01-30 18:05 出处:网络
Cant get the CUR status working. the menue always have the classes marked with 0 instead of those marked with 2. what i am doing wrong? My typoscript code:

Cant get the CUR status working. the menue always have the classes marked with 0 instead of those marked with 2. what i am doing wrong? My typoscript code:

10.marks {
MENU_OBEN = HMENU
MENU_OBEN {
  special = directory
  special.value = 10
  1 = TMENU
  1 {
    wrap = <ul>|</ul> 
    noBlur = 1  
    NO = 1
    NO {
      allWrap = <li class="first0"> | </li> |*| <li class="normal0"> | </li> |*| <li class="last0"> | </li>  
      stdWrap.wrap = <strong> | </strong> |*| | |*| <b> | </b>
    }
    CUR = 1
    CUR {       
      allWrap = <li class="first2"> | </li> |*| <li class="normal2"> | </li> |*| <li class="last2"开发者_如何学运维> | </li>  
      stdWrap.wrap = <strong> | </strong> |*| | |*| <b> | </b>
    }  
  }
}


Don't see anything obvious, but have you tried removing the NO = 1 line? IIRC the normal ("NO") state doesn't need to be explicitly set, as long as you set some properties for it... maybe by setting it explicitly you're overriding the state?


In my general ts template I have no NO=1. Instead I copy the NO status into CUR. I really dont know why, but it works for me this way.

e.g.

    NO.wrapItemAndSub = <li> | </li>
    NO.stdWrap.htmlSpecialChars = 1

    CUR < .NO
    CUR = 1
    CUR.ATagParams = class="cur"

    ACT < .NO
    ACT = 1
    ACT.ATagParams = class="act"


Keep in mind that for page shortcuts this cannot work, since if you klick on a shortcut you never are on the page which is supposed to become active/current.

Just change the page property to standard page and set "Display Content of Page" in "Apperance" Tab.

0

精彩评论

暂无评论...
验证码 换一张
取 消