业务经理

微信扫描以上二维码

028-61286886

技术咨询

这个判断没生效呢目的是判断有无三级栏目有三级输出上面的样式没

迅睿框架 更新 2020-12-06 12:10:04 奇艺界

{list action=category module=share num=6 pid=0}

<li id="menu-10157-1" class="{if $catid && in_array($catid, $t.catids)}active-trail{/if} middle even sf-item-2 sf-depth-1 sf-total-children-12 sf-parent-children-5 sf-single-children-7 menuparent"> <a href="{$t.name}" class="sf-depth-1 menuparent">{$t.name}</a> {if $t.child}

  <ul>

    {list action=category module=share pid=$t.id return=t2}

    

    

    {if $t2.child}

    <li id="menu-11737-1" class="middle even sf-item-2 sf-depth-2 sf-total-children-6 sf-parent-children-0 sf-single-children-6 menuparent"> <a href="{$t2.url}" class="sf-depth-2 menuparent">{$t2.name}</a>

      <ul>

        {list action=category module=share pid=$t2.id return=t3}

        <li id="menu-10161-1" class="first odd sf-item-1 sf-depth-3 sf-no-children"><a href="{$t3.url}" class="sf-depth-3">{$t3.name}</a></li>

        {/list}

      </ul>

    </li>

    {else}

    

    

    {list action=category module=share pid=$t.id return=t2}

    <li id="menu-10178-1" class="first odd sf-item-1 sf-depth-2 sf-no-children"><a href="{$t2.url}" class="sf-depth-2">{$t2.name}</a></li>

    {/list}

    

    

    

    {/if} 

    

    

    

    {/list}

  </ul>

  {/if} </li>

{/list}



{xunruicms_img_title}


这个 判断 没生效呢  :目的是判断 有无三级栏目  有三级 输出上面的 样式  没有 三级 输出下面的 样式:



目前是{xunruicms_img_title}

反复循环了  谢谢


方案

  • 迅睿框架创始人 #1 · 2020-10-20 10:04:56
    我最不喜欢看这种循环层级太多的循环了,一看着头就大了
  • 二开/定制/使用解答专家 #2 · 2020-10-20 10:08:09
    满意答案

    {list action=category module=share pid=$t.id return=t2}

    <li id="menu-10178-1" class="first odd sf-item-1 sf-depth-2 sf-no-children"><a target="_blank" href="{$t2.url}" class="sf-depth-2">{$t2.name}</a></li>

    {/list}改成 <li id="menu-10178-1" class="first odd sf-item-1 sf-depth-2 sf-no-children"><a target="_blank" href="{$t2.url}" class="sf-depth-2">{$t2.name}</a></li>
    官方默认模板有现成的写法,可以借鉴

  • 奇艺界 #3 · 2020-12-06 12:10:04
    @二开/定制/使用解答专家:OK谢谢OK谢谢

迅睿系统漏洞

外贸多语言建站
外贸多语言建站(2026-10-30)
修正对百度编辑器提取支持
AI文章生成器
AI文章生成器(2026-10-29)
任务插图设置数量
Bing站长数据
Bing站长数据(2026-10-29)
根据BING接口调整菜单 各个页面数据支持点击查看详情
按字段付费
按字段付费(2026-10-29)
按字段付费用于模块的字段设置一定的价格,当用户购买了此内容的字段时才...
泛解析站群系统
泛解析站群系统(2026-10-29)
AI队列增加清空按钮 表单提示语收敛 目录模式不接管主域名模板
账号注销
账号注销(2026-10-29)
用于用户中心的注销账号申请,后台审核通过后注销此账号。后台统一管理注...
邮件群发
邮件群发(2026-10-28)
修改模板的命名
自定义收款/捐款
自定义收款/捐款(2026-10-28)
自定义收款或捐款插件可以让用户快速创建付款或者捐款功能
CMS内容批量修改
CMS内容批量修改(2026-10-28)
后台批量修改文章内容的指定字段在插件后台可以任意指定字段
全站模块搜索
全站模块搜索(2026-10-28)
实现全模块一次性搜索内容,一键搜索全站内容精准搜索全部模块: