栏目对象标签
作用:显示某个栏目
参数:
id:栏目ID
path:栏目路径
siteId: 站点ID,存在时获取该站点栏目,不存在时获取当前站点栏目
示例:
[@cms_channel id='1']
<ahref="${tag_bean.url}" target="_blank">${tag_bean.name}</a>
[/@cms_channel]
效果截图:
使用前:
使用后:
上面图片的整个效果的代码:
<div id="main">
<div class="page box">
<div class="w700 fl box">
<div class="rb_top"></div>
<div class="rb_mid box">
<div class="w300 fl">
<div class="shrd">
<h2>[@cms_channel id='1']<a href="${tag_bean.url}" target="_blank">${tag_bean.name}</a>[/@cms_channel]</h2>
<ul class="list">
[@cms_content_list channelId='1' count='6' orderBy='4' titLen='18'
descLen='40' append='...' channelOption='1'] [#list tag_list as a] [#if
a_index = 0]
<li class="toptext">
<h3><a href="${a.url}" title="${a.title}" target="_blank">${a.stit}</a></h3>
<a href="${a.url}" target="_blank"><img
src="${a.titleImg!site.defImg}" alt="${a.title}" /></a>
<p>[@text_cut s=a.desc len=descLen append=append/]</p>
</li>
[#else]
<li><span><a href="${a.ctgUrl}" target="_blank">[${a.ctgName}]</a></span>
<a href="${a.url}" title="${a.title}" target="_blank">[@text_cut
s=a.title len=titLen append=append/]</a></li>
[/#if] [/#list] [/@cms_content_list]
</ul>
</div>
</div>
<div class="rb_low"></div>
</div>