联系官方销售客服

1835022288

028-61286886

开发框架 版主:迅睿框架研发组
如何限制第级栏目前台调用的数量这个参数放进去报错
类型:迅睿CMS 更新时间:2021-02-02 14:31:15 前台 栏目

如何限制第3级栏目前台调用的数量 

num=2这个参数放进去报错

 {category module=share pid=0 }
                               <li class="dropdown {if IS_SHARE && $catid && in_array($catid, $t.catids)}current {/if}  {if IS_SHARE && 3 && in_array(3, $t.catids)}dropdown-three{/if}  {if IS_SHARE && 10 && in_array(10, $t.catids)}dropdown-ten1{/if}" id="{if IS_SHARE && $catid && in_array($catid, $t.catids)}dropdown-nav{/if}">
                                   <a href="{$t.url}" title="{$t.name}" id="dropdown-height">{$t.name}</a>
   {if $t.child}
                                   <ul>
       {category module=share pid=$t.id return=t2}
                                       <li class="{if $t2.child}dropdown{/if}"><a href="{$t2.url}">{$t2.name}</a>
         {if $t2.child}
                                            <ul id="nav-pc">
                                            {category module=share pid=$t2.id return=t3 num=2}
                                               <li><a href="{$t3.url}" title="{$t3.name}">- {$t3.name}</a></li>
                                           {/category}
                                           </ul>
         </li>
          {/if}
      {/category}
                                   </ul>
   {/if}
                               </li>
{/category}