




已阅读5页,还剩55页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
CMS模板置标使用手册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_list$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$/#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 图片切换flash的样式,默认有三种样式,还包括3-2,3-3titLen=20 新闻标题截取长度。count=5 切换图片个数flashWidth=300 flash高度flashHeight=200 flash宽度textHeight=20 标题高度,如果设置为0,则不显示标题。1.3首页新闻列表 此框标签的作用是获取新闻列表的栏目名称及more图标。cms_channel id=60$tag_/cms_channelcms_channel id=60/cms_channelcms_channel id=60 取id为60的栏目相关信息$tag_bean.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 代表最新发布的文章放最上面。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=truetext_cut s=a.title len=titLen append=append/#elsetext_cut s=a.title 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 channelOption=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 titLen=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=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: 滚动跨度;【一次滚动的像素,跨度越大,滚动就越快,但越不流畅】不能为空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 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_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 as 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.ctgName新闻所在栏目的名字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_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=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=. 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 append=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! 篇 待审文章: $contentCheckingCount! 篇 评论总数: $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.isNewContentFlag=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.getYear()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(DateGL.getYear()+/1/1)/86400000)+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,0x64,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 Array();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;Bytes1 = 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 )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 = 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 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 CnMonthStrMonth + 月;function CnDayofDate(DateGL)var CnDayStr=new Array(零,初一, 初二, 初三, 初四, 初五,初六, 初七, 初八, 初九, 初十,十一, 十二, 十三, 十四, 十五,十六, 十七, 十八, 十九, 二十,廿一, 廿二, 廿三, 廿四, 廿五,廿六, 廿七, 廿八, 廿九, 三十);var Day;Day = (Math.abs(CnDateofDate(DateGL)%100;return CnDayStrDay;function DaysNumberofMonth(DateGL)var MM1=DateGL.getYear();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)/86400000);function CnEra(YYYY)var Tiangan=new Array(甲,乙,丙,丁,戊,己,庚,辛,壬,癸);/var Dizhi=new Array(子(鼠),丑(牛),寅(虎),卯(兔),辰(龙),巳(蛇),/午(马),未(羊),申(猴),酉(鸡),戌(狗),亥(猪);var Dizhi=new Array(子,丑,寅,卯,辰,巳,午,未,申,酉,戌,亥);return TianganYYYY%10+DizhiYYYY%12;function CnDateofDateStr(DateGL)if(CnMonthofDate(DateGL)=零月) /return 请调整您的计算机日期!;return ;else return 农历: + CnMonthofDate(DateGL) + CnDayofDate(DateGL);function SolarTerm(DateGL)var SolarTermStr=new Array(小寒,大寒,立春,雨水,惊蛰,春分,清明,谷雨,立夏,小满,芒种,夏至,小暑,大暑,立秋,处暑,白露,秋分,寒露,霜降,立冬,小雪,大雪,冬至);var DifferenceInMonth=new Array(1272060,1275495,1281180,1289445,1299225,1310355,1321560,1333035,1342770,1350855,1356420,1359045,1358580,1355055,1348695,1340040,1329630,1318455,1306935,1297380,1286865,1277730,1274550,1271556);var DifferenceInYear=31556926;var BeginTime=new Date(1901/1/1);BeginTime.setTime(947120460000);for(;DateGL.getYear()BeginTime.getYear();)BeginTime.setTime(BeginTime.getTime()+DifferenceInYear*1000);for(var M=0;DateGL.getMonth()BeginTime.getMonth();M+)Be
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 校招文科笔试题目及答案
- 小学语音考试题目及答案
- 企业文化建设与传播方案执行落地标准化模板
- 健康办公环保家具采购合同
- 建筑公司工程结算审计合同
- 家政服务合同按月结算
- 我的老师800字左右初中作文14篇
- 早期创业培训课件
- 写景作文厦门夜景500字13篇
- 音乐基础知识巩固:小学音乐基础知识教学大纲
- 小学食堂供餐管理方案(3篇)
- 湖北省武汉市武昌区重点名校2026届中考语文全真模拟试题含解析
- 2.4抽象函数的周期性与对称性-讲义(原卷版)
- 养老院重要环境因素控制措施
- 喷粉挂钩管理办法
- 2025手机维修服务合同范本
- 藏文教学课件
- 血透室手卫生管理课件
- 风电场安全规程考试题库(附答案)
- DB11∕T 1205-2024 用能单位能源审计报告编制与审核技术规范
- 轨道工程制图教学课件
评论
0/150
提交评论