1、獲取指定模塊下的某一個(gè)頻道數據
{:channel::show($module,$pid):}返回一個(gè)一維數組
相關(guān)參數
$module:要獲取的頻道所屬模塊,1文章模塊、2商品模塊、3圖片模塊、4下載模塊
$pid:頻道ID,為 0 時(shí)將獲取指定模塊下的第一個(gè)頻道。缺省值為 0
調用實(shí)例
獲取當前文章模塊下的第一個(gè)頻道數據:
{:$cnl = channel::show(1):} 頻道名稱(chēng):{:$cnl['title']:} 外部頻道鏈接URL:{:$cnl['url']:} 外部頻道窗口打開(kāi)方式(_blank 或 _self):{:$cnl['target']:} SEO標題:{:$cnl['seotitle']:} SEO關(guān)鍵字:{:$cnl['seokey']:} SEO描述:{:$cnl['seodescr']:}
2、導航欄數據調用
{:channel::navigation():}
返回所有已啟用的頻道導航數據,無(wú)可用參數。
{:foreach channel::navigation() as $n:} {:$n['title']:} {:/foreach:}