版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、CMS模板置标使用手册一 首页.html1.1首页导航首页导航循环从数据库中获取栏目,首页栏目页内容页导航代码是一样的。效果图如下:1.1.1一级导航cms_channel_list首页#list tag_list as c$/#list/cms_channel_list$base/ 回到首页标签$c.url 栏目链接$ 栏目名称1.1.2多级导航cms_channel_list网站首页#list tag_list as c cms_channel_list parentId=c.id#if tag_list?size0#else/#if/cms_channel_lis
2、t$cms_channel_list parentId=c.id#if tag_list?size0cms_channel_list parentId=c.id #list tag_list as c1 cms_channel_list parentId=c1.id#if tag_list?size0#else/#if/cms_channel_list $ cms_channel_list parentId=c1.id#if tag_list?size0cms_channel_list parentId=c1.id #list tag_list as c2$c2.na
3、me/#list/cms_channel_list/#if/cms_channel_list /#list /cms_channel_list/#if/cms_channel_list /#list /cms_channel_list1.2首页图片切换cms_content_list typeId=3 styleList=3-1 titLen=20 count=5 flashWidth=300 flashHeight=200 textHeight=20 channelOption=1tpl=2/typeId=3 表示取类型为“焦点”的新闻的类型图来展示。styleList=3-1 图片切换fl
4、ash的样式,默认有三种样式,还包括3-2,3-3titLen=20 新闻标题截取长度。count=5 切换图片个数flashWidth=300 flash高度flashHeight=200 flash宽度textHeight=20 标题高度,如果设置为0,则不显示标题。1.3首页新闻列表 1.3.1第一种新闻列表标签格式此框标签的作用是获取新闻列表的栏目名称及more图标。cms_channel id=60$tag_/cms_channelcms_channel id=60/cms_channelcms_channel id=60 取id为60的栏目相关信息$tag_bea
5、n.url 栏目的超链接$tag_ 栏目的名称此标签作用是循环获取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 atext_cut s=a.title len=titLen append=append/#list/cms_content_list循环获取新闻内容。 channelId即栏目id,orderBy=4
6、代表最新发布的文章放最上面。titLen=20 截取的新闻标题长度count=5 代表显示5条记录。dateFormat=yyyy-MM-dd, 定义日期格式。text_cut s=a.title len=titLen append=append/表示截取titLen 这个长度的新闻标题进行显示。append=. 表示超过截取标题长度后,以 结尾。1.3.2第二种新闻列表标签格式cms_content_list channelId=2589 headMarkImg=/images/logo.gif orderBy=4 count=10 titLen=10 append= channelOpti
7、on=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
8、选择是否显示标题的样式:变色,加粗等【0:不显示;1:显示】不能为空bottomLine=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显示栏目名字和本栏目下的新闻如果是第一条显示栏
9、目的名字,如果不是显示栏目下面的新闻cms_content_list channelId=29625 orderBy=5 count=5 titLen=20 descLen=40 append=. channelOption=1 dateFormat=yyyy-MM-dd #list tag_list as a #if (a_index=0) $ /#if text_cut s=a.title len=titLen append=append/ /#list/cms_content_list1.4带有new图标,字体加粗,变色的首页新闻列表如果用1.3.2中第二种新
10、闻列表标签格式,来写新闻列表,那用showTitleStyle =1就可以显示标题的颜色和加粗等;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=truetext_cut s=a.title len=titLen append=append/#elsetext_cut s=a.tit
11、le len=titlen append=append/#if#if a.isNewContentFlag?exists#if a.isNewContentFlag=1#if a.contentFlagHoldTime?#if a.contentFlagHoldTime?datetime gt a.currentDate?datetime#if a.newContentImgFlag?/#if/#if/#if/#if/#if/#list/cms_content_list1.5图文新闻 1.5.1类型图cms_content_list typeId=2 count=1 titLen=10 cha
12、nnelOption=1 siteId=4#list tag_list as a text_cut s=a.txt len=145 append=./ /#list /cms_content_listtypeId=2 取新闻类型为图文的新闻的类型图。取此条新闻的类型图,即上传的图片。text_cut s=a.txt len=145 append=./取此条新闻的内容,截取长度为145,多出的用 代替1.5.2标题图cms_channel id=2$tag_/cms_channelcms_content_list channelId=2 orderBy=4 count=6 ti
13、tLen=20 descLen=40 append=. channelOption=1#list tag_list as a#if a_index = 0$a.stit!text_cut s=a.desc len=descLen append=append/#else$a.ctgName text_cut s=a.title len=titLen append=append/#if/#list/cms_content_list#if a_index = 0 如果是第一篇新闻$a.stit显示新闻的标题$a.ctgUrl新闻所在栏目的链接$a.ctgName新闻所在栏目的名字text_cut s
14、=a.desc len=descLen append=append/ 摘要标题图1.6滚动1.6.1图文列表向左滚动以下js放在head标签里。cms_content_list topicId=1 typeId=2 count=8 styleList=2-4 titLen=16 rollLineHeight=70 rollSpan=1 rollSpeed=1 tpl=2/说明:rollLineHeight: 滚动区行高;【按像素px计算】不能为空rollSpeed: 滚动速度;【滚动速度,值越小越快,最小为1】不能为空rollSpan: 滚动跨度;【一次滚动的像素,跨度越大,滚动就越快,但越不
15、流畅】不能为空topicId=1滚动中的图片要属于一个专题typeId=2图片所在内容是图文类型1.6.2图文向上滚动cms_content_list topicId=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_list styleList=2-1 titLen=10 count=9 rollCols=3
16、 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_channel_list首 页#list tag_list as c$/#list/cms_channel_
17、list滚动资讯: cms_content_list styleList=2-1 titLen=16 count=9 rollCols=3 rollDisplayHeight=20 rollLineHeight=20 rollSpeed=20 rollSleepTime=100 rollRows=1 dateFormat=MM-dd datePosition=3 dateClass=red channelOption=1 tpl=2/cms_channel_list#list tag_list as ccms_channel_list parentId=c.id#list tag_list a
18、s sub$/#list/cms_channel_list/#list/cms_channel_list1.7文章显示所在栏目:栏目名称cms_content_list channelId=2 orderBy=4 count=6 titLen=20 descLen=40 append=. channelOption=1#list tag_list as a$a.ctgNametext_cut s=a.title len=titLen append=append/#list/cms_content_listtitLen=20标题长度$a.ctgUrl新闻所在栏目的地址$a.ctg
19、Name新闻所在栏目的名字1.8常用标签1.8.1常用tags即定义的一些关键字,可以通过点击这些关键字查询到相关新闻。首先要在系统设置Tag管理处添加tag常用标签,比如添加反邪教之后再添加文章时,”Tag标签处”填写反邪教。cms_tag_list count=8#list tag_list as tag$#if tag_has_next|/#if/#list/cms_tag_list1.8.2标签详情页 cms_content_page tagId=tag.id count=10 descLen=100 append=. “$” Tag标签 共有 $tag
20、_list?size 条 相关资讯:#list tag_pagination.list as s $s.ctgName $s.titletext_cut s=s.description len=descLen append=append/来源: $s.origin!本站原创 浏览次数:$s.views次 发布时间: $s.releaseDate /#list cms_pagination sysPage=1/ /cms_content_page1.9图片友情链接cms_content_list typeId=2 count=5 titLen=
21、10 channelId=45854 channelOption=1 siteId=1936#list tag_list as a#if (a_index+1)%5!=0&a_index!=tag_list?size /#if/#list /cms_content_list1.10首页栏目页中新闻列表时间标签$a.date?string(dateFormat)1.11首页序号变化#if (a_index+1)%2=0&a_index!=tag_list?size1.12首页头条cms_content_list count=2 typeId=4 descLen=60 append=.
22、channelOption=1#list tag_list as a$a.stittext_cut s=a.desc len=descLen append=append/#list/cms_content_listtypeId=4为头条descLen=60控制内容管理中摘要的长度$a.stit头条的标题1.13首页推荐cms_content_list count=5 recommend=1 titLen=20 dateFormat=MM-dd channelOption=1#list tag_list as a$a.ctgName text_cut s=a.title len=titLen a
23、ppend=append/$a.date?string(dateFormat)/#list/cms_content_listdateFormat=MM-dd显示月日01-04recommend=1内容为推荐1.14首页序号#list tag_list as a$a_index+1/#list1.15站点计数站点计数(显示浏览总数,今日浏览总数,昨日浏览总数,本月浏览总数,上月浏览总人数)频道统计(栏目文章总数等相关信息) cms_channel_statistics channelId=channel.id 文章总数: $contentAllCount! 篇 待审文章: $contentChe
24、ckingCount! 篇 评论总数: $commentCount! 条 文章阅读: $viewCount! 人次/cms_channel_statistics1.16首页栏目页颜色标签 #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/ /#if1.17 new图标#if a.isNewContentFlag?exists#if a.isNewConte
25、ntFlag=1#if a.contentFlagHoldTime?#if a.contentFlagHoldTime?datetime gt a.currentDate?datetime#if a.newContentImgFlag? /#if/#if /#if/#if/#if1.18日期:2012年1月16日 星期一 农历:腊月廿三Js文件内容在文件夹中 ShowDate.js文件内容如下function RunGLNL()var today=new Date();var d=new Array(星期日,星期一,星期二,星期三,星期四,星期五,星期六);var DDDD=+(today.g
26、etYear()100 ?today.getYear()+1900:today.getYear()+年+(today.getMonth()+1)+月+today.getDate()+日;DDDD = DDDD + + dtoday.getDay();DDDD = DDDD+ + (CnDateofDateStr(today);/DDDD = DDDD+ + SolarTerm(today);document.write(DDDD);function DaysNumberofDate(DateGL)return parseInt(Date.parse(DateGL)-Date.parse(Dat
27、eGL.getYear()+/1/1)/)+1;function CnDateofDate(DateGL)var CnData=new Array(0x16,0x2a,0xda,0x00,0x83,0x49,0xb6,0x05,0x0e,0x64,0xbb,0x00,0x19,0xb2,0x5b,0x00,0x87,0x6a,0x57,0x04,0x12,0x75,0x2b,0x00,0x1d,0xb6,0x95,0x00,0x8a,0xad,0x55,0x02,0x15,0x55,0xaa,0x00,0x82,0x55,0x6c,0x07,0x0d,0xc9,0x76,0x00,0x17,0
28、x64,0xb7,0x00,0x86,0xe4,0xae,0x05,0x11,0xea,0x56,0x00,0x1b,0x6d,0x2a,0x00,0x88,0x5a,0xaa,0x04,0x14,0xad,0x55,0x00,0x81,0xaa,0xd5,0x09,0x0b,0x52,0xea,0x00,0x16,0xa9,0x6d,0x00,0x84,0xa9,0x5d,0x06,0x0f,0xd4,0xae,0x00,0x1a,0xea,0x4d,0x00,0x87,0xba,0x55,0x04);var CnMonth=new Array();var CnMonthDays=new A
29、rray();var CnBeginDay;var LeapMonth;var Bytes=new Array();var I;var CnMonthData;var DaysCount;var CnDaysCount;var ResultMonth;var ResultDay;var yyyy=DateGL.getYear();var mm=DateGL.getMonth()+1;var dd=DateGL.getDate();if(yyyy100) yyyy+=1900;if (yyyy 2020)return 0;Bytes0 = CnData(yyyy - 1997) * 4;Byte
30、s1 = CnData(yyyy - 1997) * 4 + 1;Bytes2 = CnData(yyyy - 1997) * 4 + 2;Bytes3 = CnData(yyyy - 1997) * 4 + 3;if (Bytes0 & 0x80) != 0) CnMonth0 = 12;else CnMonth0 = 11;CnBeginDay = (Bytes0 & 0x7f);CnMonthData = Bytes1;CnMonthData = CnMonthData =0;I-)CnMonthDays15 - I = 29;if (1 I) & CnMonthData) != 0 )
31、CnMonthDays15 - I+;if (CnMonth15 - I = LeapMonth )CnMonth15 - I + 1 = - LeapMonth;elseif (CnMonth15 - I 12 ) CnMonth15 - I + 1 = 1;DaysCount = DaysNumberofDate(DateGL) - 1;if (DaysCount 1901) & (CnDateofDate(new Date(yyyy - 1)+/12/31) 0)ResultMonth = - CnMonth0;else ResultMonth = CnMonth0;ResultDay
32、= CnBeginDay + DaysCount;elseCnDaysCount = CnMonthDays0 - CnBeginDay;I = 1;while (CnDaysCount DaysCount) & (CnDaysCount + CnMonthDaysI 0)return ResultMonth * 100 + ResultDay;elsereturn ResultMonth * 100 - ResultDay;function CnYearofDate(DateGL)var YYYY=DateGL.getYear();var MM=DateGL.getMonth()+1;var
33、 CnMM=parseInt(Math.abs(CnDateofDate(DateGL)/100);if(YYYYMM) YYYY-;YYYY-=1864;return CnEra(YYYY)+年;function CnMonthofDate(DateGL)var CnMonthStr=new Array(零,正,二,三,四,五,六,七,八,九,十,十一,腊);var Month;Month = parseInt(CnDateofDate(DateGL)/100);if (Month 0)return 闰 + CnMonthStr-Month + 月;elsereturn CnMonthStr
34、Month + 月;function CnDayofDate(DateGL)var CnDayStr=new Array(零,初一, 初二, 初三, 初四, 初五,初六, 初七, 初八, 初九, 初十,十一, 十二, 十三, 十四, 十五,十六, 十七, 十八, 十九, 二十,廿一, 廿二, 廿三, 廿四, 廿五,廿六, 廿七, 廿八, 廿九, 三十);var Day;Day = (Math.abs(CnDateofDate(DateGL)%100;return CnDayStrDay;function DaysNumberofMonth(DateGL)var MM1=DateGL.getYe
35、ar();MM1100 ? MM1+=1900:MM1;var MM2=MM1;MM1+=/+(DateGL.getMonth()+1);MM2+=/+(DateGL.getMonth()+2);MM1+=/1;MM2+=/1;return parseInt(Date.parse(MM2)-Date.parse(MM1)/);function CnEra(YYYY)var Tiangan=new Array(甲,乙,丙,丁,戊,己,庚,辛,壬,癸);/var Dizhi=new Array(子(鼠),丑(牛),寅(虎),卯(兔),辰(龙),巳(蛇),/午(马),未(羊),申(猴),酉(鸡),戌(狗),亥(猪);var Dizhi=new Array(子,丑,寅,卯,辰,巳,午,未,申,酉,戌,亥);return TianganYYYY%10+DizhiYYYY%12;function CnDateofDateStr(DateGL)if(CnMo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 新生儿气道及呼吸机管路护理
- 特殊患者的皮肤护理
- 2026年居间合同和买卖合同(1篇)
- 2026年玉米代烘合同(1篇)
- 地下变电室工程施工组织设计方案范本
- 中职教师个人发展规划名师资料
- 护理患者权利保护
- 老年护理员技师老年护理信息化技术应用
- 泌尿外科肿瘤患者的护理
- 2026 塑型进阶月饼课件
- 初三学生中考简历模板
- 考评员考试:考评员考试必看题库知识点
- 《光伏发电工程可行性研究报告编制规程》(NB/T32043-201)中文版
- CAESAR-II简易操作手册
- 病案首页质量控制与管理实施方案
- 咯血临床思维及诊断治疗课件
- 广州佰仕德材料科技有限公司年产1000吨有机硅电子密封胶和1050吨电子灌封胶建设项目环境影响报告表
- 先导式减压阀的设计方案
- YS/T 429.1-2000铝幕墙板 板基
- 汕头市南澳岛演示文稿课件
- 西安交大流体力学题与答案
评论
0/150
提交评论