JEECMS模板置标使用手册(重新整理版)

更新时间:2024-06-17 04:39:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

CMS模板置标使用手册

CMS模板置标使用手册

2012.04

- 1 -

目录

一、首页页面分析 ..................................................................................................................................................... 1

1.1首页导航 ....................................................................................................................................................... 1

1.1.1一级导航 ............................................................................................................................................ 1 1.1.2多级导航 .......................................................................................................................................... 1 1.2首页图片切换 .............................................................................................................................................. 3 1.3首页新闻列表 .............................................................................................................................................. 3 1.4带有new图标,字体加粗,变色的首页新闻列表 ................................................................................... 5 1.5图文新闻 ...................................................................................................................................................... 6

1.5.1类型图 .............................................................................................................................................. 6 1.5.2标题图 .............................................................................................................................................. 7 1.6滚动 .............................................................................................................................................................. 8

1.6.1图文列表向左滚动 .......................................................................................................................... 8 1.6.2图文向上滚动 .................................................................................................................................. 9 1.6.3文字列表向上滚动 .......................................................................................................................... 9 1.6.4首页滚动资讯: .............................................................................................................................. 9 1.7文章显示所在栏目:[栏目名称] ............................................................................................................ 10 1.8常用标签 ..................................................................................................................................................... 11

1.8.1常用tags ........................................................................................................................................ 11 1.8.2标签详情页 ..................................................................................................................................... 11 1.9图片友情链接 ............................................................................................................................................ 12 1.10首页栏目页中新闻列表时间标签 .......................................................................................................... 13 1.11首页序号变化 .......................................................................................................................................... 13 1.12首页头条 .................................................................................................................................................. 13 1.13首页推荐 .................................................................................................................................................. 14 1.14首页序号 .................................................................................................................................................. 15 1.15站点计数 .................................................................................................................................................. 15 1.16首页栏目页颜色标签 .............................................................................................................................. 15 1.17 new图标 .................................................................................................................................................. 16 1.18日期:2012年1月16日 星期一 农历:腊月廿三 .............................................................................. 16 \1.19 登陆到后台的代码 ........... 20 二 新闻栏目.html ................................................................................................................................................. 22

2.1栏目页新闻列表 ........................................................................................................................................ 22 2.2左边二级菜单效果 .................................................................................................................................... 23 2.3栏目页栏目本月排行 ................................................................................................................................ 25 三 新闻内容.html ............................................................................................................................................... 26

3.1新闻内容 .................................................................................................................................................... 26 3.2内容页翻页 ................................................................................................................................................ 27 3.3浏览次数 .................................................................................................................................................... 27 3.4上一篇下一篇 ............................................................................................................................................ 28 3.5文章内容页显示相关文章 ........................................................................................................................ 29 3.6内容页颜色标签 ........................................................................................................................................ 29

I

3.7日顶踩(带修改没有测试通过) ............................................................................................................ 30 四 单页.html ................................................................................................................................................... 30

4.1单页效果 .................................................................................................................................................... 30 五 投票模块 ....................................................................................................................................................... 31

5.1投票页 ........................................................................................................................................................ 31 5.2投票结果页 ................................................................................................................................................ 33 六 搜索 ............................................................................................................................................................... 35

6.1搜索页 ........................................................................................................................................................ 35 6.2 搜索结果页 ............................................................................................................................................... 36 七 评论 ................................................................................................................................................................... 37

7.1首页热门评论 ............................................................................................................................................ 37 八 留言管理 ............................................................................................................................................................. 42

8.1首页的留言 ................................................................................................................................................ 43 8.2留言板首页 ................................................................................................................................................ 44 8.3留言板类别页 ............................................................................................................................................ 47 8.4留言板详情页 ............................................................................................................................................ 48 九 专题 ................................................................................................................................................................. 49

9.1首页精彩专题 ............................................................................................................................................ 49 9.2专题导航页 ................................................................................................................................................ 51 9.3专题默认页.html ...................................................................................................................................... 54

9.3.1专题新闻列表 ................................................................................................................................ 63 9.3.2专题图文切换 ................................................................................................................................ 63 9.3.3专题排行 ........................................................................................................................................ 64 9.3.4专题精彩图文 ................................................................................................................................ 64 9.3.5专题概要 ........................................................................................................................................ 64 9.3.6专题内容图 .................................................................................................................................... 64 9.3.7专题热评资讯 ................................................................................................................................ 65 9.3.8其他热门专题 ................................................................................................................................ 65

常用参数解释 ........................................................................................................................................................... 66

常用部分 ........................................................................................................................................................... 66

1 留言栏目 ............................................................................................................................................... 66 2子站点 .................................................................................................................................................... 66 3显示站点 栏目 新闻的名字 ................................................................................................................ 66 4 include .................................................................................................................................................... 66 5类型图 .................................................................................................................................................... 67 6标题图 .................................................................................................................................................... 67 7内容图 .................................................................................................................................................... 67 8获取新闻所在栏目的名字和地址 ........................................................................................................ 67 9获取新闻的地址和标题以及新闻的摘要............................................................................................. 67 10取第一条新闻和换行 .......................................................................................................................... 67 11翻页效果标签 ...................................................................................................................................... 68 12描述 ...................................................................................................................................................... 68 13已审 待审 终审 .................................................................................................................................. 68 文章列表标签 ................................................................................................................................................... 68

II

14文章 栏目ID ....................................................................................................................................... 68 15 tag ID .................................................................................................................................................... 68 16 siteId ID ................................................................................................................................................ 68 17 typeid新闻的四种类型 ....................................................................................................................... 69 18 topicId ................................................................................................................................................... 69 19 tagName ................................................................................................................................................ 69 20 channelPath ........................................................................................................................................... 69 21 channelOption ....................................................................................................................................... 69 22 Recommend .......................................................................................................................................... 69 23 title ........................................................................................................................................................ 69 24 image .................................................................................................................................................... 70 25 excluded ................................................................................................................................................ 70 26 orderby .................................................................................................................................................. 70 文字列表标签 ................................................................................................................................................... 71

27 lineHeight ............................................................................................................................................. 71 28 headMarkImg ........................................................................................................................................ 71 29 headMark .............................................................................................................................................. 71 30 bottomLine ............................................................................................................................................ 71 31 dateFormat ............................................................................................................................................ 71 32 datePosition........................................................................................................................................... 71 33 ctgForm ................................................................................................................................................. 71 34 showTitleStyle ...................................................................................................................................... 72 35 useShortTitle ......................................................................................................................................... 72 36 titLen ..................................................................................................................................................... 72 37 target ..................................................................................................................................................... 72 38 styleList ................................................................................................................................................ 72

III

CMS模板置标使用手册

一、首页页面分析

1.1首页导航

首页导航循环从数据库中获取栏目,首页栏目页内容页导航代码是一样的。 效果图如下:

1.1.1一级导航

[@cms_channel_list] 首页 [#list tag_list as c]

${c.name} [/#list]

[/@cms_channel_list]

${base}/ 回到首页标签 ${c.url} 栏目链接 ${c.name} 栏目名称

1.1.2多级导航

[@cms_channel_list]

网站首页

[#list tag_list as c] [@cms_channel_list parentId=c.id] [#if

1

CMS模板置标使用手册

tag_list?size>0]

  • [#else]

    [/#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]

  • [#else]

    [/#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=https://www.bwwdw.com/plus/\> ${tag_bean.name} [/@cms_channel]

    [@cms_channel id='60']

    href=https://www.bwwdw.com/plus/\>

    [/@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==https://www.bwwdw.com/plus/\ a.contentFlagHoldTime??] [#if a.contentFlagHoldTime?datetime gt

    5

    CMS模板置标使用手册

    a.currentDate?datetime] [#if a.newContentImgFlag??]

    name=https://www.bwwdw.com/plus/\ alt=https://www.bwwdw.com/plus/\预览https://www.bwwdw.com/plus/\ src=https://www.bwwdw.com/plus/\ /> [/#if] [/#if] [/#if] [/#if] [/#if] [/#list] [/@cms_content_list]

    1.5图文新闻

    1.5.1类型图

    [@cms_content_list typeId=2 count=1 titLen=10 channelOption=https://www.bwwdw.com/plus/\siteId=4] [#list tag_list as a]

    https://www.bwwdw.com/plus/\

    [@text_cut s=a.txt len=https://www.bwwdw.com/plus/\

    [/#list] [/@cms_content_list]

    typeId=2 取新闻类型为图文的新闻的类型图。

    [@text_cut s=a.txt len=https://www.bwwdw.com/plus/\

    取此条新闻的内容,截取长度为145,多出的用 ?? 代替

    6

    CMS模板置标使用手册

    1.5.2标题图

    [@cms_channel id='2']

    ${tag_bean.name}

    [/@cms_channel] [@cms_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!}

    src=https://www.bwwdw.com/plus/\ alt=https://www.bwwdw.com/plus/\ />

    [@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/] 摘要

    7

    CMS模板置标使用手册

    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'图片所在内容是图文类型

    8

    CMS模板置标使用手册

    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]

    首 页

    9

    CMS模板置标使用手册

    [#list tag_list as c]

    onmouseover=https://www.bwwdw.com/plus/\>${c.name}

    [/#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 c]

        [@cms_channel_list parentId=c.id] [#list tag_list as sub] ${sub.name} [/#list] [/@cms_channel_list]

        [/#list] [/@cms_channel_list]

    1.7文章显示所在栏目:[栏目名称]

    [@cms_content_list channelId='2' orderBy='4' count='6' titLen='20' descLen='40' append='...' channelOption='1'] [#list tag_list as a]

    [${a.ctgName}]

    10

    CMS模板置标使用手册

    [@text_cut s=a.title len=titLen append=append/]

    [/#list] [/@cms_content_list]

    titLen='20'标题长度

    ${a.ctgUrl}新闻所在栏目的地址 ${a.ctgName}新闻所在栏目的名字

    1.8常用标签

    1.8.1常用tags

    即定义的一些关键字,可以通过点击这些关键字查询到相关新闻。

    首先要在系统设置?Tag管理处添加tag常用标签,比如添加反邪教

    之后再添加文章时,”Tag标签处”填写反邪教。

    [@cms_tag_list count='8'] [#list tag_list as tag]

    ${tag.name} [#if tag_has_next]|[/#if] [/#list]

    [/@cms_tag_list]

    11

    CMS模板置标使用手册

    1.8.2标签详情页

    [@cms_content_page tagId=tag.id count='10' descLen='100' append='...']

    “${tag.name}” Tag标签 共有 ${tag_list?size} 条 相关资讯:

    [#list tag_pagination.list as s]

    [

    target=https://www.bwwdw.com/plus/\>${s.ctgName}]

    ${s.title}

    [@text_cut s=s.description len=descLen append=append/]

    来源: ${s.origin!'本站原创'}    浏览次数:${s.views}次    发布时间: ${s.releaseDate}

    [/#list]

    [@cms_pagination sysPage='1'/] [/@cms_content_page]

    1.9图片友情链接

    12

    CMS模板置标使用手册

    [@cms_content_list typeId=2 count=5 titLen=10 channelId=45854

    channelOption=https://www.bwwdw.com/plus/\siteId=1936] [#list tag_list as a] https://www.bwwdw.com/plus/\

    [#if

    (a_index+1)%5!=0&&a_index!=tag_list?size]

      [/#if] [/#list] [/@cms_content_list]

    1.10首页栏目页中新闻列表时间标签

    ${a.date?string(dateFormat)}

    1.11首页序号变化

    [#if (a_index+1)%2==0&&a_index!=tag_list?size]

    1.12首页头条

    13

    CMS模板置标使用手册

    [@cms_content_list count='2' typeId='4' descLen='60' append='...' channelOption='1'] [#list tag_list as a]

  • title=https://www.bwwdw.com/plus/\ target=https://www.bwwdw.com/plus/\>

    ${a.stit}

    [@text_cut s=a.desc len=descLen append=append/]

    [/#list] [/@cms_content_list]

    typeId='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_list]

    dateFormat='MM-dd'显示月日01-04 recommend='1'内容为推荐

    14

    CMS模板置标使用手册

    1.14首页序号

    [#list tag_list as a] ${a_index+1} [/#list]

    1.15站点计数

    站点计数(显示浏览总数,今日浏览总数,昨日浏览总数,本月浏览总数,上月浏览总人数)

    频道统计(栏目文章总数等相关信息)

    [@cms_channel_statistics channelId=channel.id] 文章总数: ${contentAllCount!} 篇

    待审文章: ${contentCheckingCount!} 篇
    评论总数: ${commentCount!} 条
    文章阅读: ${viewCount!} 人次
    [/@cms_channel_statistics]

    1.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/] [/#if]

    15

    CMS模板置标使用手册

    1.17 new图标

    [#if a.isNewContentFlag?exists] [#if a.isNewContentFlag==\ [#if a.contentFlagHoldTime??]

    [#if a.contentFlagHoldTime?datetime gt a.currentDate?datetime]

    [#if a.newContentImgFlag??]

    \预览\ [/#if] [/#if] [/#if] [/#if] [/#if]

    1.18日期:2012年1月16日 星期一 农历:腊月廿三

    Js文件内容在文件夹中 ShowDate.js文件内容如下 function RunGLNL(){ var today=new Date();

    var d=new Array(\星期日\星期一\星期二\星期三\星期四\星期五\星期六\

    \<100 ? today.getYear()+1900:today.getYear())+\年

    \月\日\

    DDDD = DDDD + \ (CnDateofDateStr(today)); //DDDD = DDDD+ \\+ SolarTerm(today); document.write(DDDD); } function DaysNumberofDate(DateGL){ return

    parseInt((Date.parse(DateGL)-Date.parse(DateGL.getYear()+\/1\

    } function CnDateofDate(DateGL){ var CnData=new Array(

    16

    CMS模板置标使用手册

    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(yyyy<100) yyyy+=1900; if ((yyyy < 1997) ||

    (yyyy > 2020)){ return 0; } Bytes[0] = CnData[(yyyy - 1997) * 4];

    Bytes[1] = CnData[(yyyy - 1997) * 4 + 1]; Bytes[2] = CnData[(yyyy -

    1997) * 4 + 2]; Bytes[3] = CnData[(yyyy - 1997) * 4 + 3]; if ((Bytes[0]

    & 0x80) != 0) {CnMonth[0] = 12;} else {CnMonth[0] = 11;} CnBeginDay =

    (Bytes[0] & 0x7f); CnMonthData = Bytes[1]; CnMonthData = CnMonthData <<

    8; CnMonthData = CnMonthData | Bytes[2]; LeapMonth = Bytes[3]; for

    (I=15;I>=0;I--){ CnMonthDays[15 - I] = 29; if (((1 << I) & CnMonthData) != 0 ){ CnMonthDays[15 - I]++;} if (CnMonth[15 - I] == LeapMonth ){ CnMonth[15 - I + 1] = - LeapMonth;} else{ if (CnMonth[15 - I] < 0

    ){CnMonth[15 - I + 1] = - CnMonth[15 - I] + 1;} else {CnMonth[15

    17

    CMS模板置标使用手册

    - I + 1] = CnMonth[15 - I] + 1;} if (CnMonth[15 - I + 1] > 12 ){ CnMonth[15 -

    I + 1] = 1;} } } DaysCount = DaysNumberofDate(DateGL) - 1; if (DaysCount <= (CnMonthDays[0] - CnBeginDay)){ if ((yyyy > 1901) &&

    (CnDateofDate(new Date((yyyy - 1)+\< 0)){ ResultMonth = -

    CnMonth[0];} else {ResultMonth = CnMonth[0];} ResultDay = CnBeginDay +

    DaysCount; } else{ CnDaysCount = CnMonthDays[0] - CnBeginDay; I = 1; while ((CnDaysCount < DaysCount) && (CnDaysCount + CnMonthDays[I] <

    DaysCount)){ CnDaysCount+= CnMonthDays[I]; I++; } ResultMonth =

    CnMonth[I]; ResultDay = DaysCount - CnDaysCount; } if (ResultMonth >

    0){ return ResultMonth * 100 + ResultDay;} else{return ResultMonth *

    100 - ResultDay;} } function CnYearofDate(DateGL){ var YYYY=DateGL.getYear(); var MM=DateGL.getMonth()+1; var CnMM=parseInt(Math.abs(CnDateofDate(DateGL))/100); if(YYYY<100)

    YYYY+=1900; if(CnMM>MM) YYYY--; YYYY-=1864; return CnEra(YYYY)+\年\

    function CnMonthofDate(DateGL){ var CnMonthStr=new

    Array(\零\正\二\三\四\五\六\七\八\九\十\十一\腊\

    Month = parseInt(CnDateofDate(DateGL)/100); if (Month < 0){return \闰\

    CnMonthStr[-Month] + \月\月\

    function CnDayofDate(DateGL){ var CnDayStr=new Array(\零\初一\初二\

    \初三\初四\初五\初六\初七\初八\初九\初十\十一\十二\十三\十四\

    \十五\十六\十七\十八\十九\二十\廿一\廿二\

    18

    CMS模板置标使用手册

    廿三\廿四\廿五\廿六\

    \廿七\廿八\廿九\三十\

    (Math.abs(CnDateofDate(DateGL)))0; return CnDayStr[Day]; } function

    DaysNumberofMonth(DateGL){ var MM1=DateGL.getYear(); MM1<100 ? MM1+=1900:MM1; var MM2=MM1; MM1+=\ MM2+=\ parseInt((Date.parse(MM2)-Date.parse(MM1))/86400000); } function

    CnEra(YYYY){ var Tiangan=new

    Array(\甲\乙\丙\丁\戊\己\庚\辛\壬\癸\//var Dizhi=new

    Array(\子(鼠)\丑(牛)\寅(虎)\卯(兔)\辰(龙)\巳(蛇)\ //\午(马)\未(羊)\申(猴)\酉(鸡)\戌(狗)\亥(猪)\Dizhi=new

    Array(\子\丑\寅\卯\辰\巳\午\未\申\酉\戌\亥\

    Tiangan[YYYY]+Dizhi[YYYY]; } function CnDateofDateStr(DateGL){

    if(CnMonthofDate(DateGL)==\零月\请调整您的计算机日期!\

    else return \农历:\CnDayofDate(DateGL); }

    function SolarTerm(DateGL){ var SolarTermStr=new Array( \小寒\大寒\立春\雨水\惊蛰\春分\清明\谷雨\立夏\小满\芒种\夏至\

    \小暑\大暑\立秋\处暑\白露\秋分\寒露\霜降\立冬\小雪\大雪\冬至\

    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.setTime(BeginTime.getTime()-DifferenceInYear*1000); }

    19

    CMS模板置标使用手册

    for(;DateGL.getYear()>BeginTime.getYear();){

    BeginTime.setTime(BeginTime.getTime()+DifferenceInYear*1000); } for(var

    M=0;DateGL.getMonth()>BeginTime.getMonth();M++){

    BeginTime.setTime(BeginTime.getTime()+DifferenceInMonth[M]*1000); }

    if(DateGL.getDate()>BeginTime.getDate()){

    BeginTime.setTime(BeginTime.getTime()+DifferenceInMonth[M]*1000); M++;

    } if(DateGL.getDate()>BeginTime.getDate()){

    BeginTime.setTime(BeginTime.getTime()+DifferenceInMonth[M]*1000);

    M==23?M=0:M++; } var JQ;

    if(DateGL.getDate()==BeginTime.getDate()){

    JQ=\今天是\ \

    if(DateGL.getDate()==BeginTime.getDate()-1){ JQ=\明天是\ \

    if(DateGL.getDate()==BeginTime.getDate()-2){ JQ=\后天是\ \

    if(DateGL.getMonth()==BeginTime.getMonth()){ JQ+=\

    本月\下月\日\

    color='#FF9999'>\

    \

    1.19 登陆到后台的代码

    用户登录

    20

    CMS模板置标使用手册

    21

    CMS模板置标使用手册

    二 新闻栏目.html

    2.1栏目页新闻列表

    您的位置:首页 > [#list channel.nodeList as n]${n.name}[#if n_has_next] > [/#if][/#list] >

    循环获取栏目文章列表

    [@cms_content_page channelId=channel.id count='4' titLen='15' append='...' orderBy='2' dateFormat='yyyy-MM-dd' channelOption='1']

    [#list tag_pagination.list as a]

    22

    CMS模板置标使用手册

    [/#list]

    [/@cms_content_page]

    翻页效果标签

    2.2左边二级菜单效果

    显示1层

    [@cms_channel_list parentId=channel.id] [#list tag_list as c]

    [/@cms_channel_list]

    显示2层代码

    [@cms_channel_list parentId=channel.id] [#list tag_list as c]

  • [/@cms_channel_list] [/#list]

    [/@cms_channel_list]

    显示3层代码

    ${channel.name}显示栏目名字

    [#if channel.parent?exists]

    23

    CMS模板置标使用手册

    [#if channel.parent.parent?exists]

    [#if channel.parent.parent.parent?exists]

    [#else]

    [@cms_channel_list parentId=channel.parent.parent.id] [#list tag_list as c]

    [/@cms_channel_list] [/#list]

    [/@cms_channel_list]

    [/#if] [#else]

    [@cms_channel_list parentId=channel.parent.id] [#list tag_list as c]

    [/@cms_channel_list] [/#list]

    [/@cms_channel_list]

    [/#if] [#else]

    [@cms_channel_list parentId=channel.id] [#list tag_list as c]

    24

    CMS模板置标使用手册

    [/@cms_channel_list] [/#list]

    [/@cms_channel_list] [/#if]

    2.3栏目页栏目本月排行

    栏目本月排行

      [@cms_content_list channelId=channel.id count='10' titLen='15' orderBy='2' channelOption='1']

      [#list tag_list as a]

      ${a.views!}

      href=\>[@text_cut s=a.title len=titLen append=append/]

      25

      CMS模板置标使用手册

      五 投票模块

      5.1投票页

      需要在内容管理系统后台手动添加一个投票,并把这个投票设置为默认,然后添加代码,代码加上完之后的前台效果如下图:

      首页放置投票的地方添加如下代码

      也可以在模板里新建一个叫做include的文件夹,在include下建立投票栏.html模板

      在需要加投票代码的地方加上如下语句: [#include \投票栏.html\把下面的代码放到 投票栏.html中

      [@cms_vote]

      [#if !tag_bean??]

      没有默认投票主题 [#else]

      [/#if]

      [/@cms_vote]

      32

      CMS模板置标使用手册

      5.2投票结果页

      在模板中新建一个special文件夹,在special下面添加一个投票结果页.html

      [#elseif status==2] 投票项不能为空

      [#elseif status==100] 投票主题不存在

      [#elseif status==101] 投票项不合法

      [#elseif status==501] 需要登录才能投票

      [#elseif status==200] 投票主题已经关闭

      [#elseif status==201]

      投票的选项个数大于允许的个数 [#elseif status==202] 投票还没有开始

      [#elseif status==203]

      33

      CMS模板置标使用手册

      投票已经结束

      [#elseif status==204]

      您已经投过票了,请勿重复投票! [#elseif status==205]

      您已经投过票,请勿重复投票!了 [#elseif status==206]

      您已经投过票了,请勿重复投票! [#else] 投票失败 [/#if]

      [#else]

      [#list vote.items as item]

      34

      CMS模板置标使用手册

      [/#list] [/#if]

      六 搜索

      6.1搜索页

      35

      本文来源:https://www.bwwdw.com/article/vos3.html

  • Top