php - 寻路器打印类作为手风琴的内容
问题描述
我有一个旧模板,我将 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>
推荐阅读
- kubernetes - 如何解决临时本地存储问题?
- java - 从 Spark 读取 Teradata 时出错。它加载了表并显示架构但未能给出数据集结果
- javascript - Vuejs v-for错误删除元素firebase
- javascript - 开玩笑将模拟类传递给构造函数
- ipfs - 超出上下文截止日期 - IPFS
- kubernetes - 在 Kubernetes 中,如何在空闲时将部署扩展到零
- javascript - 单击模式中的按钮后如何显示引导程序警报?
- python - 使用 SQLAlchemy 核心 API 过滤相关模型(使用 AIOPG)
- string - VB.net 修剪功能
- python - python中的分段非线性回归