菜单状态 CUR 不工作

发布于 2024-10-08 03:12:27 字数 775 浏览 6 评论 0原文

无法使 CUR 状态正常工作。菜单中总是标有 0 的类,而不是标有 2 的类。我做错了什么?我的打字代码:

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>
    }  
  }
}

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>
    }  
  }
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

氛圍 2024-10-15 03:12:27

没有看到任何明显的东西,但是您是否尝试过删除 NO = 1 行? IIRC 正常(“NO”)状态不需要显式设置,只要您为其设置一些属性...也许通过显式设置它您可以覆盖状态?

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?

﹏半生如梦愿梦如真 2024-10-15 03:12:27

在我的通用 ts 模板中,我没有 NO=1。相反,我将 NO 状态复制到 CUR 中。我真的不知道为什么,但这种方式对我有用。

例如

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

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

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

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"
独自唱情﹋歌 2024-10-15 03:12:27

请记住,对于页面快捷方式,这是行不通的,因为如果您单击快捷方式,您就永远不会位于应该变为活动/当前状态的页面上。

只需将页面属性更改为标准页面,并在“外观”选项卡中设置“页面显示内容”即可。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文