Dedecms首页资讯列表是以一个循环调用的,是根据后台分类的ID顺序进行调用的.但在很多时候确想只让指定的一些分类栏目在首页显.下面就来说说调用的方法
正常情况下的代码应该是这样的:
1
<
div
class
=
"
listbox
"
>
2 {dede : channelartlist }
3 < dl class = " tbox " >
4 < dt >< strong >< a href = " {dede:field name='typeurl'/} " > {dede : field name = ' typename ' / } </ a ></ strong >< span class = " more " >< a href = " {dede:field name='typeurl'/} " > 更多 ...</ a ></ span ></ dt >
5 < dd >
6 < ul class = " ico3 d1 " >
7 {dede : arclist titlelen = ' 60 ' row = ' 8 ' }
8 < li >< span > [field : pubdate function = " MyDate('m-d',@me) " / ] </ span >< a href = " [field:arcurl /] " > [field : title / ] </ a ></ li >
9 { / dede : arclist}
10 </ ul >
11 </ dd >
12 </ dl >
13 { / dede : channelartlist}
14 </ div >
15 <!-- / listbox -->
2 {dede : channelartlist }
3 < dl class = " tbox " >
4 < dt >< strong >< a href = " {dede:field name='typeurl'/} " > {dede : field name = ' typename ' / } </ a ></ strong >< span class = " more " >< a href = " {dede:field name='typeurl'/} " > 更多 ...</ a ></ span ></ dt >
5 < dd >
6 < ul class = " ico3 d1 " >
7 {dede : arclist titlelen = ' 60 ' row = ' 8 ' }
8 < li >< span > [field : pubdate function = " MyDate('m-d',@me) " / ] </ span >< a href = " [field:arcurl /] " > [field : title / ] </ a ></ li >
9 { / dede : arclist}
10 </ ul >
11 </ dd >
12 </ dl >
13 { / dede : channelartlist}
14 </ div >
15 <!-- / listbox -->
如果要实现上面所讲的指定栏目显示的较果方法如下:
1
<
div
class
=
"
listbox
"
>
2 {dede : channelartlist typeid = 6 , 9 col = 1 }
3 < dl class = " tbox " >
4 < dt >< strong >< a href = " {dede:field name='typeurl'/} " > {dede : field name = ' typename ' / } </ a ></ strong >< span class = " more " >< a href = " {dede:field name='typeurl'/} " > 更多 ...</ a ></ span ></ dt >
5 < dd >
6 < ul class = " ico3 d1 " >
7 {dede : arclist titlelen = ' 60 ' row = ' 8 ' }
8 < li >< span > [field : pubdate function = " MyDate('m-d',@me) " / ] </ span >< a href = " [field:arcurl /] " > [field : title / ] </ a ></ li >
9 { / dede : arclist}
10 </ ul >
11 </ dd >
12 </ dl >
13 { / dede : channelartlist}
14 </ div >
15 <!-- / listbox – >
2 {dede : channelartlist typeid = 6 , 9 col = 1 }
3 < dl class = " tbox " >
4 < dt >< strong >< a href = " {dede:field name='typeurl'/} " > {dede : field name = ' typename ' / } </ a ></ strong >< span class = " more " >< a href = " {dede:field name='typeurl'/} " > 更多 ...</ a ></ span ></ dt >
5 < dd >
6 < ul class = " ico3 d1 " >
7 {dede : arclist titlelen = ' 60 ' row = ' 8 ' }
8 < li >< span > [field : pubdate function = " MyDate('m-d',@me) " / ] </ span >< a href = " [field:arcurl /] " > [field : title / ] </ a ></ li >
9 { / dede : arclist}
10 </ ul >
11 </ dd >
12 </ dl >
13 { / dede : channelartlist}
14 </ div >
15 <!-- / listbox – >
{dede:channelArtlist typeid=1,2,3 col=1} 这里面的typeid=你所要调用的ID号,中间中,隔开!