CMS模板置标使用手册

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

CMS模板置标使用手册1CMS模板置标使用手册一首页.html1.1首页导航首页导航循环从数据库中获取栏目,首页栏目页内容页导航代码是一样的。效果图如下:1.1.1一级导航ulli[@cms_channel_list]ahref=${base}/首页/a[#listtag_listasc]Ahref=${c.url}${c.name}/A[/#list][/@cms_channel_list]/li/ul${base}/回到首页标签${c.url}栏目链接${c.name}栏目名称1.1.2多级导航ul[@cms_channel_list]liahref=${base}/span网站首页/span/a/li[#listtag_listasc][@cms_channel_listparentId=c.id][#iftag_list?size0]liclass=havechildCMS模板置标使用手册2[#else]li[/#if][/@cms_channel_list]ahref=${c.url}target=_selfspan${c.name}/span/a[@cms_channel_listparentId=c.id][#iftag_list?size0]ul[@cms_channel_listparentId=c.id][#listtag_listasc1][@cms_channel_listparentId=c1.id][#iftag_list?size0]liclass=havesubchild[#else]li[/#if][/@cms_channel_list]ahref=${c1.url}${c1.name}/a[@cms_channel_listparentId=c1.id][#iftag_list?size0]ul[@cms_channel_listparentId=c1.id][#listtag_listasc2]liahref=${c2.url}${c2.name}/a/li[/#list][/@cms_channel_list]/ul[/#if][/@cms_channel_list]/li[/#list][/@cms_channel_list]/ul[/#if][/@cms_channel_list]/li[/#list][/@cms_channel_list]/ul1.2首页图片切换divclass=imju[@cms_content_listtypeId='3'styleList='3-1'titLen='20'count='5'flashWidth='300'flashHeight='200'textHeight='20'channelOption='1'tpl='2'/]/divtypeId='3'表示取类型为“焦点”的新闻的类型图来展示。CMS模板置标使用手册3styleList='3-1'图片切换flash的样式,默认有三种样式,还包括'3-2','3-3'titLen='20'新闻标题截取长度。count='5'切换图片个数flashWidth='300'flash高度flashHeight='200'flash宽度textHeight='20'标题高度,如果设置为0,则不显示标题。1.3首页新闻列表1.3.1第一种新闻列表标签格式此框标签的作用是获取新闻列表的栏目名称及more图标。h3id=lie1spanclass=sl[@cms_channelid='60']ahref=${tag_bean.url}${tag_bean.name}/a[/@cms_channel]/span!—more图标--spanclass=sr[@cms_channelid='60']ahref=${tag_bean.url}imgsrc=/${res}/images/more.jpg//a[/@cms_channel]/span/h3[@cms_channelid='60']取id为60的栏目相关信息${tag_bean.url}栏目的超链接${tag_bean.name}栏目的名称此标签作用是循环获取channelId='60'新闻栏目下的新闻内容。CMS模板置标使用手册4ul[@cms_content_listchannelId='60'orderBy='4'count='5'titLen='20'descLen='40'append='...'channelOption='1'dateFormat='yyyy-MM-dd'][#listtag_listasa]liahref=${a.url}target=_blank[@text_cuts=a.titlelen=titLenappend=append/]/a/li[/#list][/@cms_content_list]/ul循环获取新闻内容。channelId即栏目id,orderBy='4'代表最新发布的文章放最上面。titLen='20'截取的新闻标题长度count='5'代表显示5条记录。dateFormat='yyyy-MM-dd',定义日期格式。[@text_cuts=a.titlelen=titLenappend=append/]表示截取titLen这个长度的新闻标题进行显示。append='...'表示超过截取标题长度后,以…结尾。1.3.2第二种新闻列表标签格式[@cms_content_listchannelId='2589'headMarkImg=/images/logo.giforderBy='4'count='10'titLen='10'append='…'channelOption='1'dateFormat='MM-dd'datePosition='2'styleList='1-1'lineHeight='1'showTitleStyle='1'bottomLine='1'ctgForm='2'target=‘1’tpl='2'/]这段标签可以用在首页也可以用在栏目页,它的作用就是:显示栏目Id为2589的内容列表,内容的列表的前面显示自己定义的一张图片,显示新闻所在的栏目,新闻标题,并且显示标题的样式,还显示新闻时间,有下划线,有headMarkImg时这个headMark='4'就不起作用了。styleList='1-1'可以选择不同的新闻列表的样式showTitleStyle='1'选择是否显示标题的样式:变色,加粗等【0:不显示;1:显示】不能为空CMS模板置标使用手册5bottomLine='1'是否有底线【0:无;1:有】不能为空。headMark='3'选择新闻头部的箭头的样式【1:小黑点;2:小红点;3:单箭头;4:双箭头】headMarkImg=/images/logo.gif列表头图片;【图片地址】地址要写模板名字后面的地址datePosition='2'日期位置;【1:后面左边;2:后面右边;3:前面】不能为空ctgForm:类别;【0:无;1:栏目;2:站点】不能为空target:是否新窗口打开;【0:原窗口;1:新窗口】不能为空1.3.3显示栏目名字和本栏目下的新闻如果是第一条显示栏目的名字,如果不是显示栏目下面的新闻[@cms_content_listchannelId='29625'orderBy='5'count='5'titLen='20'descLen='40'append='...'channelOption='1'dateFormat='yyyy-MM-dd']TR[#listtag_listasa][#if(a_index==0)]TDDIValign=center[SPANAclass=bluehref=${a.channel.name}/A/SPAN]/DIV/TD[/#if]TDDIValign=centerAhref=${a.url}target=_blank[@text_cuts=a.titlelen=titLenappend=append/]/A/DIV/TD[/#list]/TR[/@cms_content_list]1.4带有new图标,字体加粗,变色的首页新闻列表如果用1.3.2中第二种新闻列表标签格式,来写新闻列表,那用showTitleStyle='1'就可以显示标题的颜色和加粗等;[@cms_content_listchannelId='1043'siteId=1026orderBy='4'count='5'titLen='25'descLen='40'channelOption='1'dateFormat='yyyy-MM-dd']CMS模板置标使用手册6[#listtag_listasa]LI[#ifa.titleColor?exists]ahref=${a.url}class='a4'style='color:${a.titleColor}'target=_blank[#else]ahref=${a.url}class='a4'target=_blank[/#if][#ifa.bold==true]strong[@text_cuts=a.titlelen=titLenappend=append/]/strong/a[#else][@text_cuts=a.titlelen=titlenappend=append/]/a[/#if]/A[#ifa.isNewContentFlag?exists][#ifa.isNewContentFlag==1][#ifa.contentFlagHoldTime??][#ifa.contentFlagHoldTime?datetimegta.currentDate?datetime][#ifa.newContentImgFlag??]imgname=newContentImgFlagalt=预览src=${a.newContentImgFlag}/[/#if][/#if][/#if][/#if][/#if]/LI[/#list][/@cms_content_list]1.5图文新闻1.5.1类型图[@cms_content_listtypeId=2count=1titLen=10channelOption=1siteId=4][#listtag_listasa]dldtahref=${a.url}title=${a.title}target=_blankimgsrc=${a.typeImg!site.defImg}alt=${a.title}//a/dtddahref=${a.url}title=${a.title}target=_blank[@text_cuts=a.txtlen=145append=....../]/a/dd/dlCMS模板置标使用手册7[/#list][/@cms_content_list]typeId=2取新闻类型为图文的新闻的类型图。imgsrc=${a.typeImg!site.defImg}alt=${a.title}/取此条新闻的类型图,即上传的图片。[@text_cuts=a.txtlen=145append=....../]取此条新闻的内容,截取长度为145,多出的用……代替1.5.2标题图[@cms_channelid='2']ahref=${tag_bean.url}target=_blank${tag_bean.name}/a[/@cms_channel][@cms_conte

1 / 64
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功