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

迅睿框架 更新 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谢谢

迅睿系统漏洞

GeoSeo工具箱
GeoSeo工具箱(2026-11-30)
新增内容创作工作台 优化CSS样式归集
分类信息
分类信息(2026-11-30)
分类信息把招聘、房产、二手、本地服务和商家收成同城门户。访客按开通城...
AI文章生成器
AI文章生成器(2026-11-30)
优化模型思考模式配置
小黄人工具箱
小黄人工具箱(2026-11-28)
新增模块列表栏目树功能
留言板
留言板(2026-11-28)
可用于在线留言,预约,反馈,询盘,后台可查看留言信息和审核
签到管理
签到管理(2026-11-27)
修复失效图标
站长工作台
站长工作台(2026-11-27)
1 新增 网站信息自定义字段支持删除功能 2 新增 网站信息--...