迅睿菜單調用 欄目調用樣例代碼demo
欄目面包屑
{dr_catpos($catid, '', true, '<a href="[url]">[name]</a> > ')}
<ul>
<li class="636319a64d697{if $indexc} current{/if}"><a href="{CLIENT_URL}" aria-current="page">首頁</a></li>
{category module=share pid=0 num=12 return=c1}
<li class="636319a64d69d {if $c1.id==$top.id}current{/if}" ><a href="{$c1.url}" target="_blank">{$c1.name}</a>
{if $c1.child}
<ul class="636319a64d69e sub-nav">
{category module=pb pid=$c1.id return=c2}
<li><a href="{$c2.url}">{$c2.name}</a></li>
{/category}
</ul>{/if}
</li>
{/category}
</ul>
查詢共享欄目的所有頂級欄目
{category module=share pid=0}
欄目名稱{$t.name}
欄目地址{$t.url}
縮略圖 {dr_thumb($t.thumb)}
欄目內容{$t.content}
{/category}
這里的【$t.**】t是由return參數值來決定的,比如有些是return=c,那么t就改成c,成為{$c.name}
查詢共享欄目的指定id為1,2,3,4的欄目
{category module=share id=1,2,3,4}
欄目名稱{$t.name}
欄目地址{$t.url}
{/category}
這里的【$t.**】t是由return參數值來決定的,比如有些是return=c,那么t就改成c,成為{$c.name}
兩級循環顯示欄目(先循環父欄目,再循環其子欄目)如果有三級欄目,以此類推
{category module=share pid=0 return=c1}
我是父欄目:{$c1.name}
{if $c1.child}
存在子欄目
{category module=share pid=$c1.id return=c2}
我是{$c1.name}的子欄目:{$c2.name}
{/category}
{/if}
{/category}
內容欄目封面模板category.html 調用指定欄目下的所有子欄目
{dr_catpos($catid, '', true, '[name] ')} 獲取本欄目封面的名字和鏈接
pid=指定欄目的id
{category module=share pid=3 return=c1}
{$c1.name}
{/category}
如果您的問題還未解決可以聯系站長付費協助。

有問題可以加入技術QQ群一起交流學習
本站vip會員 請加入無憂模板網 VIP群(50604020) PS:加入時備注用戶名或昵稱
普通注冊會員或訪客 請加入無憂模板網 技術交流群(50604130)
客服微信號:15898888535
聲明:本站所有文章資源內容,如無特殊說明或標注,均為采集網絡資源。如若內容侵犯了原著者的合法權益,可聯系站長刪除。