我在特殊标签之后(在 div 结束之后)插入子菜单时遇到问题。我想要的是:
<li>
<div class="toggle">Menu1</div>
<ul style="display: none;" class="content">
<li class="first2"><a href="#">menu2</a></li>
<li class="first2"><a href="#">menu2</a></li>
</ul>
</li>
但我得到的是:
<li>
<div class="toggle">Menu1
<ul style="display: none;" class="content">
<li class="first2"><a href="#">menu2</a></li>
<li class="first2"><a href="#">menu2</a></li>
</ul>
</div>
</li>
我的代码打字稿是:
lib.menuVertical= HMENU
lib.menuVertical.wrap = <ul class="rgaccordmenu"> |</ul>
lib.menuVertical.entryLevel = 1
lib.menuVertical{
1 = TMENU
1{
# no state: formatting for normal items
expAll = 1
NO{
wrapItemAndSub = <li><div class="empty">|</div></li>
}
# act state: valid from the rootpage to the actual page
ACT=1
ACT{
wrapItemAndSub = <li class="empty">|</li>
}
# cur state: valid for the actual page
CUR=1
CUR{
wrapItemAndSub = <li class="empty">|</li>
}
# ifsub state: valid for pages that have subpages
IFSUB=1
IFSUB{
wrapItemAndSub = <li><div class="toggle">|</div></li>
}
}
2 = TMENU
after = </div>
2.wrap = <ul style="display: none;" class="content">|</ul>
2{
NO{
wrapItemAndSub = <li class="first2">|</li>
}
ACT=1
ACT{
wrapItemAndSub = <li class="first2">|</li>
}
CUR=1
CUR{
wrapItemAndSub = <li class="first2">|</li>
}
IFSUB=1
IFSUB{
wrapItemAndSub = <li class="first2">|</li>
}
}
}
您知道如何在 not in ... 之后插入子菜单,谢谢。