channelartlist 獲取當(dāng)前頻道的下級欄目的內(nèi)容列表
[基礎(chǔ)用法]
名稱:channelartlist
功能:獲取當(dāng)前頻道的下級欄目的內(nèi)容列表標(biāo)簽
語法:
{eyou:channelartlist typeid='欄目ID' type='son' row='20'}
<a href='{eyou:field name='typeurl' /}'>{eyou:field name='typename' /}</a>
{eyou:arclist limit='0,10' titlelen='30'}
<a href='{$field.arcurl}'>{$field.title}</a>
{/eyou:arclist}
{/eyou:channelartlist}
參數(shù):
typeid='' 欄目ID,多個請用","分開
row='100' 調(diào)用欄目數(shù)
titlelen='30' 欄目名稱長度
type='son' 表示下級欄目
- type='self' 表示同級欄目
- type='top' 表示頂級欄目
- type='sonself' 表示當(dāng)前下級欄目以及同級欄目
mod='' 每隔N行輸出的內(nèi)容
empty='' 沒有數(shù)據(jù)時顯示的文案
底層字段:
請查閱易優(yōu)Cms官方提供的數(shù)據(jù)字典,找到表名 ey_arctype
-------------------------------效果展示--------------------------------1,調(diào)用指定欄目ID,(欄目名稱鏈接,子欄目名稱鏈接,欄目內(nèi)文章)模板調(diào)用代碼<div>
{eyou:channelartlist typeid='2'}
<div class="left_title1">{eyou:field name='typename' /}</div>
<div class="left_nav_box">
<ul class="left_nav">
{eyou:channel row="6" type ='son'}
<li><a href="{$field.typeurl}" title="{$field.typename}">{$field.typename}</a></li>
{/eyou:channel}
</ul>
<a href="{eyou:field name='typeurl' /}" class="left_more1" title="查看更多分類">查看更多分類</a> </div>
<ul class="right_pro">
{eyou:arclist row='6' titlelen='30'}
<li> <a href="{$field.arcurl}" title="{$field.title}"><img src="{$field.litpic}" width="231" height="173" alt="{$field.title}" class="PicAuto"/></a>
<p><a href="{$field.arcurl}" title="{$field.title}">{$field.title}</a></p>
</li>
{/eyou:arclist}
</ul>
{/eyou:channelartlist}
</div>
網(wǎng)站前端顯示效果(css樣式請自行填充) 【更多示例】
-------------------------------示例1--------------------------------
描述:輸出頂級欄目列表
{eyou:channelartlist type='top' row='10'}
<a href="{eyou:field name='typeurl' /}">{eyou:field name='typename' /}</a>
{/eyou:channelartlist}
-------------------------------示例2--------------------------------
描述:輸出指定欄目下的內(nèi)容列表(channelartlist標(biāo)簽里嵌套arclist標(biāo)簽)
{eyou:channelartlist typeid='10,11,12' row="10"}
{eyou:arclist row='10' titlelen='30' infolen='160'}
<a href='{$field.arcurl}'>{$field.title}</a>
{/eyou:arclist}
{/eyou:channelartlist}
-------------------------------示例3--------------------------------
描述:輸出指定欄目下的下級欄目的內(nèi)容列表(channelartlist標(biāo)簽里嵌套arclist標(biāo)簽)
{eyou:channelartlist typeid='欄目ID' type='son' row="10"}
{eyou:arclist row='10' titlelen='30' infolen='160'}
<a href='{$field.arcurl}'>{$field.title}</a>
{/eyou:arclist}
{/eyou:channelartlist}
-------------------------------示例4--------------------------------
描述:輸出指定欄目下的下級欄目列表(channelartlist標(biāo)簽里嵌套channel標(biāo)簽)
{eyou:channelartlist typeid='欄目ID' type='son' row='10'}
{eyou:channel type='son' row='10' currentstyle='active'}
<a href="{$field.typeurl}" title="{$field.typename}" class="{$field.currentstyle}">{$field.typename}</a>
{/eyou:channel}
{/eyou:channelartlist}
-------------------------------示例5--------------------------------
描述:輸出指定欄目下的下級欄目列表(channelartlist標(biāo)簽里嵌套type標(biāo)簽)
{eyou:channelartlist typeid='欄目ID' type='son' row='10'}
{eyou:type type='self'}
<a href="{$field.typeurl}" title="{$field.typename}">{$field.typename}</a>
{/eyou:type}
{/eyou:channelartlist}
本頁內(nèi)容由塔燈網(wǎng)絡(luò)科技有限公司通過網(wǎng)絡(luò)收集編輯所得,所有資料僅供用戶參考了本站不擁有所有權(quán),如您認(rèn)為本網(wǎng)頁中由涉嫌抄襲的內(nèi)容,請及時與我們聯(lián)系,并提供相關(guān)證據(jù),工作人員會在5工作日內(nèi)聯(lián)系您,一經(jīng)查實,本站立刻刪除侵權(quán)內(nèi)容。本文鏈接:http://m.jstctz.cn/10935.html