我有一个旧模板,我将MODX核心和附加功能从2.2更新到2.6.5。更新后,输出变得非常奇怪。
这是我的手风琴代码:
<li [[+wf.classes]]>
[[+wf.classnames:contains=`livello2`:eq=`livello2`:then=`<a class="goto_scheda" title="[[+wf.pagetitle]]">[[%cat.vai_scheda? &topic=`catalogo` &namespace=`plastitalia`]]</a>`:else=``]]
<a [[+wf.classnames:contains=`livello1`:eq=`livello1`:then=`class="link_tassonomia"`:else=``]] href="[[+wf.link]]" title="[[+wf.pagetitle]]">[[+wf.pagetitle]]</a>
[[+wf.wrapper]]
</li>
这是输出:
<ul class="sottomenu_catalogo">
<li class="first livello2">
first livello2
<a first="" livello2="" href="/catalogo/packaging/category/product-ml-50" title="Product ml 50">Product ml 50</a>
</li>
<li class="livello2">
livello2
<a livello2="" href="/catalogo/packaging/category/product-ml-80" title="Product ml 80">Product ml 80</a>
</li>
</ul>
有人知道如何解决这个问题吗?
我缺少:or运算符,因此,由于某种奇怪的原因,wayfinder将条件打印为类。
<li [[+wf.classes]]>
[[+wf.classnames:contains=`livello2`:or:eq=`livello2`:then=`<a class="goto_scheda" title="[[+wf.pagetitle]]">[[%cat.vai_scheda? &topic=`catalogo` &namespace=`plastitalia`]]</a>`:else=``]]
<a [[+wf.classnames:contains=`livello1`:or:eq=`livello1`:then=`class="link_tassonomia"`:else=``]] href="[[+wf.link]]" title="[[+wf.pagetitle]]">[[+wf.pagetitle]]</a>
[[+wf.wrapper]]
</li>