channelartlist 獲取當前頻道的下級欄目的內容列表
[基礎用法]
名稱:channelartlist
功能:獲取當前頻道的下級欄目的內容列表標簽
語法:
```
{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}
```
參數:
typeid='' 欄目ID,多個請用","分開
row='100' 調用欄目數
titlelen='30' 欄目名稱長度
type='son' 表示下級欄目
type='self' 表示同級欄目
type='top' 表示頂級欄目
type='sonself' 表示當前下級欄目以及同級欄目
mod='' 每隔N行輸出的內容
empty='' 沒有數據時顯示的文案
底層字段:
請查閱易優Cms官方提供的數據字典,找到表名 ey_arctype
-------------------------------效果展示--------------------------------
1,調用指定欄目ID,(欄目名稱鏈接,子欄目名稱鏈接,欄目內文章)
模板調用代碼
```
<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>
```
網站前端顯示效果(css樣式請自行填充)
【更多示例】
-------------------------------示例1--------------------------------
描述:輸出頂級欄目列表
```
{eyou:channelartlist type='top' row='10'}
<a href="{eyou:field name='typeurl' /}">{eyou:field name='typename' /}</a>
{/eyou:channelartlist}
```
-------------------------------示例2--------------------------------
描述:輸出指定欄目下的內容列表(channelartlist標簽里嵌套arclist標簽)
```
{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--------------------------------
描述:輸出指定欄目下的下級欄目的內容列表(channelartlist標簽里嵌套arclist標簽)
```
{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標簽里嵌套channel標簽)
```
{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標簽里嵌套type標簽)
```
{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}
```
- 準備工作
- 全局標簽
- Global全局配置標簽
- Arclist文檔列表
- Channel獲取欄目列表
- Channelartlist 當前頻道+循環
- Type指定欄目及內容
- Include 引用模板文件
- Arcview單條文檔數據
- Position面包屑
- Assign模板文件中定義變量
- Empty判斷變量是否為空
- Notempty判斷變量不為空
- Foreach數據/記錄循環輸出
- Volist數據/記錄循環輸出
- If條件判斷
- Switch簡單條件判斷
- Compare變量比較
- Ad廣告標簽
- Load資源文件加載
- Field獲取channelartlist標簽里的字段值
- Tag調用
- Searchform搜索標簽
- 標簽常用函數
- Flink友情鏈接
- Weapp網站插件
- Range范圍判斷標簽
- For數據循環輸出
- Ad單條廣告調用
- Attribute欄目屬性列表
- User登錄注冊標簽
- 列表標簽
- List列表數據標簽
- Pagelist列表分頁
- Arcpagelist 瀑布流分頁列表
- Screening篩選標簽
- 內容標簽
- Arcclick文檔瀏覽量
- Guestbookform留言表單
- Prenext上一篇下一篇
- 裝修標簽
- 多語言標簽
- Language多語言列表
- Lang語言包變量