资源描述
CMS模板置标使用手册.docx
《CMS模板置标使用手册.docx》由会员分享,可在线阅读,更多相关《CMS模板置标使用手册.docx(84页珍藏版)》请在冰豆网上搜索。
CMS模板置标使用手册
CMS模板置标使用手册
一首页.html
1.1首页导航
首页导航循环从数据库中获取栏目,首页栏目页内容页导航代码是一样的。
效果图如下:
1.1.1一级导航
[@cms_channel_list]
首页
[#listtag_listasc]
${c.name}
[/#list]
[/@cms_channel_list]
${base}/回到首页标签
${c.url}栏目链接
${c.name}栏目名称
1.1.2多级导航
1.2首页图片切换
[@cms_content_listtypeId='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首页新闻列表
此框标签的作用是获取新闻列表的栏目名称及more图标。
[@cms_channelid='60']
${tag_bean.name}
[/@cms_channel]
—more图标-->
[@cms_channelid='60']
[/@cms_channel]
[@cms_channelid='60']取id为60的栏目相关信息
${tag_bean.url}栏目的超链接
${tag_bean.name}栏目的名称
此标签作用是循环获取channelId='60'新闻栏目下的新闻内容。
[@cms_content_listchannelId='60'orderBy='4'count='5'titLen='20'descLen='40'append='...'channelOption='1'dateFormat='yyyy-MM-dd']
[#listtag_listasa]
[@text_cuts=a.titlelen=titLenappend=append/]
[/#list]
[/@cms_content_list]
循环获取新闻内容。
channelId即栏目id,
orderBy='4'代表最新发布的文章放最上面。
titLen='20'截取的新闻标题长度
count='5'代表显示5条记录。
dateFormat='yyyy-MM-dd',定义日期格式。
[@text_cuts=a.titlelen=titLenappend=append/]
表示截取titLen这个长度的新闻标题进行显示。
append='...'表示超过截取标题长度后,以…结尾。
[@cms_content_listtpl='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_listchannelId='1043'siteId=1026orderBy='4'count='5'titLen='25'descLen='40'channelOption='1'dateFormat='yyyy-MM-dd']
[#listtag_listasa]
[#ifa.titleColor?exists]
${a.titleColor}'target=_blank>
[#else]
[/#if]
[#ifa.bold==true]
[@text_cuts=a.titlelen=titLenappend=append/]
[#else]
[@text_cuts=a.titlelen=titlenappend=append/]
[/#if]
[#ifa.isNewContentFlag?
exists]
[#ifa.isNewContentFlag=="1"]
[#ifa.contentFlagHoldTime?
?
]
[#ifa.contentFlagHoldTime?
datetimegta.currentDate?
datetime]
[#ifa.newContentImgFlag?
?
]
[/#if]
[/#if]
[/#if]
[/#if]
[/#if]
[/#list]
[/@cms_content_list]
1.5图文新闻
1.5.1类型图
[@cms_content_listtypeId=2count=1titLen=10channelOption="1"siteId=4]
[#listtag_listasa]
site.defImg}"alt="${a.title}"/>
[@text_cuts=a.txtlen="145"append="......"/]
[/#list][/@cms_content_list]
typeId=2取新闻类型为图文的新闻的类型图。
site.defImg}"alt="${a.title}"/>
取此条新闻的类型图,即上传的图片。
[@text_cuts=a.txtlen="145"append="......"/]
取此条新闻的内容,截取长度为145,多出的用……代替
1.5.2标题图
[@cms_channelid='2']${tag_bean.name}[/@cms_channel]
[@cms_content_listchannelId='2'orderBy='4'count='6'titLen='20'descLen='40'append='...'channelOption='1']
[#listtag_listasa]
[#ifa_index=0]
${a.stit!
}
site.defImg}"alt="${a.title}"/>
[@text_cuts=a.desclen=descLenappend=append/]
[#else]
[${a.ctgName}][@text_cuts=a.titlelen=titLenappend=append/]
[/#if]
[/#list]
[/@cms_content_list]
[#ifa_index=0]如果是第一篇新闻
${a.stit}显示新闻的标题
${a.ctgUrl}新闻所在栏目的链接
[${a.ctgName}]新闻所在栏目的名字
[@text_cuts=a.desclen=descLenappend=append/]摘要
site.defImg}"alt="${a.title}"/>标题图
1.6滚动
1.6.1图文列表向左滚动
以下js放在head标签里。
[@cms_content_listtopicId='1'typeId='2'count='8'styleList='2-4'titLen='16'rollLineHeight='70'rollSpan='1'rollSpeed='1'tpl='2'/]
说明:
rollLineHeight:
滚动区行高;【按像素px计算】不能为空
rollSpeed:
滚动速度;【滚动速度,值越小越快,最小为1】不能为空
rollSpan:
滚动跨度;【一次滚动的像素,跨度越大,滚动就越快,但越不流畅】不能为空
topicId='1'滚动中的图片要属于一个专题
typeId='2'图片所在内容是图文类型
1.6.2图文向上滚动
[@cms_content_listtopicId='2'typeId='2'styleList='2-2'titLen='16'rollLineHeight='115'rollSpan='1'rollCols='4'rollSpeed='1'isSleep='1'rollSleepTime='500'rollDisplayHeight='115'tpl='2'/]
1.6.3文字列表向上滚动
[@cms_content_liststyleList='2-1'titLen='10'count='9'rollCols='3'rollDisplayHeight='20'rollLineHeight='29'rollSpeed='20'rollSleepTime='100'rollRows='1'dateFormat='MM-dd'datePosition='3'dateClass='red'channelOption='1'channelId='95'tpl='2'/]
rollCols:
滚动列数
rollRows:
滚动行数
channelId='95':
表示文字列表只获取栏目编号为95的内容。
1.6.4首页滚动资讯:
[@cms_content_listchannelId='2'orderBy='4'count='6'titLen='20'descLen='40'append='...'channelOption='1']