你好如何设置三级菜单在问题库并显示出来,默认只显示二级分类菜单 我在new文件添加了div的标签?
标签:
{if isset($cid)&&$cid!='all'}
{else}
{/if}
全部
{if isset($pid)&&$pid!=0}
{eval $_cid1=intval($pid); $subcatlist=$this->getlistbysql("select id,name,displayorder,grade from ".$this->db->dbprefix."category where iscourse=0 and isuseask=1 and grade=2 and pid=$_cid1 order by displayorder desc ");}
{else}
{if isset($cid)&&$cid!='all'}
{eval $_cid1=intval($cid); $subcatlist=$this->getlistbysql("select id,name,displayorder,grade from ".$this->db->dbprefix."category where iscourse=0 and isuseask=1 and grade=2 and pid=$_cid1 order by displayorder desc ");}
{else}
{eval $subcatlist=$this->getlistbysql("select id,name,displayorder,grade from ".$this->db->dbprefix."category where iscourse=0 and isuseask=1 and grade=2 order by displayorder desc ");}
{/if}
{/if}
{if $subcatlist}
{if $sindex<20>
{$subcat['name']}
{/if}
{if $sindex>=20}
{$subcat['name']}
{/if}
{if count($subcatlist)>=20}
查看更多
{/if}
{/if}
这段代码复制后 该怎么修改 往new里面添加
360U2632424724 2022-02-05 14:33 优艾设计网_设计客
你贴代码还不如发图片,这看起来挺糟糕,如果是三级分类,先获取到二级分类,然后在遍历当前二级分类下三级分类,循环输出
导盲猪阿蒂 2优艾设计网_在线设计022-02-05 14:39
像这样吗?
精彩评论