太阳成游戏网站

联系官方销售客服

QQ1835022299

028-61286886

太阳成游戏网站框架 版主:太阳成游戏网站框架研发组
关于if怎么写 如果存在下级栏目就输出
类型:太阳成游戏网站CMS 更新时间:2021-11-11 14:02:59 下级栏目

关于if怎么写 如果存在下级栏目就输出 

  {category module=share pid=0 num=12}

   

        {/category}




{xunruicms_img_title}

这个截图中圈红的地方想这样写,如果存在下级栏目就输出class="menu" 不存在就输出class="",应该怎么写,尝试很多次都不对



{xunruicms_img_title}

这个截图中想判断 不是首页且是当前栏目或者属于当前栏目 就是输出id="selected"     否则输出id=""

回帖
  • 太阳成游戏网站框架联合创始人
    #1楼    太阳成游戏网站框架联合创始人
    2021-11-11 13:46:36
    诺基亚手机 0
    层级选择2这里填写参数就可以生成相关的代码,每个参数后面都有用法解释,category标签的生成工具:/doc/code/category.html
  • 小黄人 18html
    #2楼    小黄人 18html
    2021-11-11 13:54:53
    Chrome 0
      {category module=share pid=0 num=12}
       
  • {$t.name}
      {category module=share pid=$t.id return=t2}
    • {$t2.name}
    • {/category}
  • {/category}
  • 小黄人 18html
    #3楼    小黄人 18html
    2021-11-11 13:55:25
    Chrome 0
      {category module=share pid=0 num=12}
       
  • {$t.name} {if $t.child}
      {category module=share pid=$t.id return=t2}
    • {$t2.name}
    • {/category}
    {/if}
  • {/category}
    满意答案
  • 大神科技
    #4楼    大神科技
    2021-11-11 14:02:59
    Chrome 0
    @小黄人 18html:对了对了对了对了对了对了对了对了对了对了对了对了对了