0

如果我有这个代码,我可以生成一个链接菜单。并说我只想包括 Uid 4 和 8。

lib.leftNavi = HMENU
lib.leftNavi.entryLevel=0
lib.leftNavi.special = list
lib.leftNavi.special.value = 4,8
lib.leftNavi.1 = TMENU
lib.leftNavi.1 {
  wrap = <div id="leftMenu"><ul class="L1">|</ul></div>
  expAll = 0
  NO = 1
  NO.allWrap = <li>|</li>
  NO.stdWrap.wrap = <span>|</span>
  RO < .NO
  RO = 1
  CUR < .NO
  CUR = 1
  CUR.allWrap = <li class="current">|</li>
  CUR.stdWrap.wrap = <span>|</span>
  CUR.ATagParams =  
  ACT < .CUR
} 

我的问题是现在..

我怎么能说我想生成一个链接菜单,来自/来自 Uid 4 下的子页面,所以它不显示指向 Uid 4 的链接,而是显示此 Uid 下的 3-5 个子页面?

..更新..

好的,我现在有了这段代码,几乎可以了。

lib.prodNavi = HMENU
lib.prodNavi.entryLevel=0
lib.prodNavi.special = list
lib.prodNavi.special.value = 5
lib.prodNavi.1 = TMENU
lib.prodNavi.1 {
    wrap = <div id="categorylist-box"><div id="categorylist-box-top"><h2><em>Produkter</em></h2></div><div id="categorylist-box-content"><ul>|</ul></div><div id="categorylist-box-bottom"></div></div><div class="pagecontent-box" id="pagecontent-box-59">
    expAll = 1
    NO = 1
    NO.allWrap = <li>|</li>
    NO.stdWrap.wrap = <span>|</span>
    NO.doNotShowLink = 0
    NO.doNotShowLink.stdWrap.override = 1
    NO.doNotShowLink.stdWrap.if {
        equals.field = uid
        value = 5
    }
    RO < .NO
    RO = 1
    CUR < .NO
    CUR = 1
    CUR.allWrap = <li class="current">|</li>
    CUR.stdWrap.wrap = <span>|</span>
    CUR.ATagParams =
    ACT < .CUR
}
lib.prodNavi.2 < lib.prodNavi.1

但它向我展示了橘子盒,几乎就像它使用 Wrap 2 次一样。 2次包装

我如何只用一个包装显示它。

一个包装

4

1 回答 1

0

您可以使用 doNotShowLink = 1 隐藏菜单项。您可以使用 stdWrap.override 隐藏单个项目。

在这里,您将显示 uid 8 以及 uid 4 的子页面和子页面。不会显示 uid 4 本身

lib.leftNavi = HMENU
lib.leftNavi.entryLevel=0
lib.leftNavi.special = list
lib.leftNavi.special.value = 4,8
lib.leftNavi.1 = TMENU
lib.leftNavi.1 {
    wrap = <div id="leftMenu"><ul class="L1">|</ul></div>
    expAll = 1
    NO = 1
    NO.allWrap = <li>|</li>
    NO.stdWrap.wrap = <span>|</span>
    NO.doNotShowLink = 0
    NO.doNotShowLink.stdWrap.override = 1
    NO.doNotShowLink.stdWrap.if {
        equals.field = uid
        value = 4
    }
    RO < .NO
    RO = 1
    CUR < .NO
    CUR = 1
    CUR.allWrap = <li class="current">|</li>
    CUR.stdWrap.wrap = <span>|</span>
    CUR.ATagParams =
    ACT < .CUR
}
lib.leftNavi.2 < lib.leftNavi.1

更新:

对于仅使用一次包装,只需将其用于 HMENU,而不是 TMENU:

lib.prodNavi = HMENU
lib.prodNavi.entryLevel=0
lib.prodNavi.special = list
lib.prodNavi.special.value = 252
lib.prodNavi.wrap = <div id="categorylist-box"><div id="categorylist-box-top"><h2><em>Produkter</em></h2></div><div id="categorylist-box-content"><ul>|</ul></div><div id="categorylist-box-bottom"></div></div><div class="pagecontent-box" id="pagecontent-box-59">
lib.prodNavi.1 = TMENU
lib.prodNavi.1 {
    expAll = 1
    NO = 1
    NO.allWrap = <li>|</li>
    NO.stdWrap.wrap = <span>|</span>
    NO.doNotShowLink = 0
    ...
}
lib.prodNavi.2 < lib.prodNavi.1
于 2013-10-17T12:50:14.323 回答