CMS模板置标使用手册
tag_list?size>0]
[/#if][/@cms_channel_list]
${c.name}
[@cms_channel_list parentId=c.id][#if tag_list?size>0]
[@cms_channel_list parentId=c.id] [#list tag_list as c1] [@cms_channel_list
parentId=c1.id][#if tag_list?size>0]
[/#if][/@cms_channel_list] ${c1.name}
[@cms_channel_list parentId=c1.id][#if tag_list?size>0]
[@cms_channel_list parentId=c1.id]
[#list tag_list as c2]
${c2.name}
[/#list] [/@cms_channel_list]
[/#if][/@cms_channel_list]
[/#list] [/@cms_channel_list]
[/#if][/@cms_channel_list]
[/#list] [/@cms_channel_list]
2
CMS模板置标使用手册
1.2首页图片切换
[@cms_content_list typeId='3' styleList='3-1' titLen='20' count='5' flashWidth='300' flashHeight='200' textHeight='20' channelOption='1'tpl='2'/]
typeId='3' 表示取类型为“焦点”的新闻的类型图来展示。 styleList='3-1' 图片切换flash的样式,默认有三种样式,还包括'3-2','3-3'
titLen='20' 新闻标题截取长度。 count='5' 切换图片个数 flashWidth='300' flash高度 flashHeight='200' flash宽度
textHeight='20' 标题高度,如果设置为0,则不显示标题。
1.3首页新闻列表
3
CMS模板置标使用手册
此框标签的作用是获取新闻列表的栏目名称及more图标。
[@cms_channel id='60'] href=\> ${tag_bean.name} [/@cms_channel]
[@cms_channel id='60'] href=\> [/@cms_channel]
[@cms_channel id='60'] 取id为60的栏目相关信息 ${tag_bean.url} 栏目的超链接 ${tag_bean.name} 栏目的名称
此标签作用是循环获取channelId='60'新闻栏目下的新闻内容。
[@cms_content_list channelId='60' orderBy='4' count='5' titLen='20'
descLen='40' append='...' channelOption='1' dateFormat='yyyy-MM-dd'] [#list tag_list as a]
[@text_cut s=a.title len=titLen append=append/] [/#list] [/@cms_content_list]
循环获取新闻内容。 channelId即栏目id, orderBy='4' 代表最新发布的文章放最上面。
4
CMS模板置标使用手册
titLen='20' 截取的新闻标题长度 count='5' 代表显示5条记录。
dateFormat='yyyy-MM-dd', 定义日期格式。
[@text_cut s=a.title len=titLen append=append/] 表示截取titLen 这个长度的新闻标题进行显示。
append='...' 表示超过截取标题长度后,以 … 结尾。
[@cms_content_list tpl='2' styleList='1-1' lineHeight='2'
showTitleStyle ='1' bottomLine='1' headMark='3' dateFormat='MM-dd'
datePosition='2' titLen='10' append='…' count='3' channelId='2589' channelOption='1'/]
styleList='1-1' 可以选择不同的新闻列表的样式
showTitleStyle ='1' 可以选择是否显示标题的样式:变色,加粗等 bottomLine='1'是否有底线
headMark='3'选择新闻头部的箭头的样式 datePosition='2'选择时间的样式
1.4带有new图标,字体加粗,变色的首页新闻列表
[@cms_content_list channelId='1043' siteId=1026 orderBy='4' count='5' titLen='25' descLen='40' channelOption='1' dateFormat='yyyy-MM-dd']
[#list tag_list as a]
[#if a.titleColor?exists] [#else] [/#if] [#if a.bold==true] [@text_cut s=a.title len=titLen append=append/]
[#else] [@text_cut s=a.title len=titlen append=append/] [/#if] [#if
a.isNewContentFlag?exists] [#if a.isNewContentFlag==\ a.contentFlagHoldTime??] [#if a.contentFlagHoldTime?datetime gt
5
CMS模板置标使用手册
a.currentDate?datetime] [#if a.newContentImgFlag??]
name=\ alt=\预览\ src=\ /> [/#if] [/#if] [/#if] [/#if] [/#if] [/#list] [/@cms_content_list]
1.5图文新闻
1.5.1类型图
[@cms_content_list typeId=2 count=1 titLen=10 channelOption=\siteId=4] [#list tag_list as a]
[@text_cut s=a.txt len=\
[/#list] [/@cms_content_list]
typeId=2 取新闻类型为图文的新闻的类型图。
[@text_cut s=a.txt len=\
取此条新闻的内容,截取长度为145,多出的用 …… 代替
6