dounieqi6959 2018-07-21 03:40
浏览 29
已采纳

wayfinder打印类作为手风琴的内容

I had an old template and I updated MODX core and extras from 2.2 to 2.6.5. After the update the output has become very strange.

here's my code for accordion:

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

and this is the output:

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

Is there someone that has some idea about how to fix this?

  • 写回答

1条回答 默认 最新

  • dongre8505 2018-07-21 04:10
    关注

    I was missing the :or operator so, for some strange reason wayfinder was printing the condition as class.

    <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>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

悬赏问题

  • ¥50 数据库开发问题求解答
  • ¥15 安装anaconda时报错
  • ¥20 如何用Python处理单元格内连续出现的重复词语?
  • ¥15 小程序有个导出到插件方式,我是在分包下引入的插件,这个export的路径对吗,我看官方文档上写的是相对路径
  • ¥20 希望有人能帮我完成这个设计( *ˊᵕˋ)
  • ¥100 将Intptr传入SetHdevmode()将Intptr传入后转换为DEVMODE的值与外部代码不一致
  • ¥50 基于ERA5数据计算VPD
  • ¥15 寻找杂志《Tornatzky, L. G., & Fleischer, M. (1990). The Processes of Technological Innovation. 》
  • ¥15 前台多人编辑时怎么让每个人保存刷新都互不干扰
  • ¥20 如何用Python删除单元格内连续出现的重复词?
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部