整理编辑CMS V6

版标签之[@cms_cut]


标签介绍

 


参数详解:


S:截取字符串长度

len:保留字符的长度

append:保留字段以后的追加字符以。。。。显示

作用:截取过长的字符串,如标题标题太长了可以。。。。表示

具体例子:

[@cms_content_list channelId='60' count='5' titLen='20' append='...' channelOption='1' dateFormat='yyyy-MM-dd']
[#list tag_list as a]
<li><a href="${a.url}" target=_blank>[@text_cut s=a.title len=titLenappend=append/]</a></li>
 [/#list]
[/@cms_content_list]

JEECMS v6版标签之[@cms_friendink_list]

标签介绍

 

参数详解

ctgId:链接类别

siteId:站点ID

enabled

enabled:是否显示

作用:显示友情链接

文字链接

[@cms_friendlink_list ctgId='1']
 [#list tag_list as link]
   <div style="margin-left:1.5%; float:left;">
   <a href="${link.domain}" οnclick="$.get('${base}/friendlink_view.jspx?id=${link.id}')"target="_blank">${link.name}</a>
        </div>
        [/#list]
        [/@cms_friendlink_list]
图片链接
[@cms_friendlink_list ctgId='2']
[#list tag_list as link]           <li><a href="${link.domain}" target="_blank" οnclick="$.get('${base}/friendlink_view.jspx?id=${link.id}')">               <imgsrc="${link.logo!site.defImg}" alt="${link.name}"/> </a></li>[/#list]  
[/@cms_friendlink_list]

 

JEECMS v6版标签之[@cms_Tag_list]

 

参数详解

count:显示个数

作用:显示tag列表

具体例子:

<div align="center" style="font-size:20px;color:red">
热门tags: 
[@cms_tag_list count='8']
[#list tag_list as tag]<a href="${base}/tag/${tag.id}.jspx" target="_blank">${tag.name}</a>[#if tag_has_next]|[/#if][/#list]
[/@cms_tag_list]
<div>

 

JEECMS v6版标签之[@cms_lucene_page]

搜索结果分页标签

参数详解

q: 搜索关键字

siteId:站点ID

channeled:栏目ID

startDate::开始时间

endDate:结束时间

作用:对搜索结果分页

具体例子:

<div class="w96" style="min-height:500px;">
   [#if q??]
   
   [@cms_lucene_page q=q channelId=channelId descLen='100' append='...' count='4' sysPage='1'  ]
      <div class="search_msg">
    您搜索的<span class="red">“${q!}”</span>,共有<span class="red">${tag_list?size} 条</span>查询结果,[@process_time/]
   </div>
   [#list tag_list as s]
       <dl class="list3">
    <dt><span>[<a href="${s.ctgUrl}" target="_blank">${s.ctgName}</a>]</span>  <a href="${s.url}" title="${s.title}" target="_blank">${s.title}</a></dt>
    <dd class="zy">[@text_cut s=s.description len=descLen append=append/]</dd>
    <dd>来源:<a href="${s.originUrl!}" target="_blank">${s.origin!'本站原创'}</a>   浏览次数:${s.views}次   发布时间: ${s.releaseDate} </dd>
    </dl>
    [/#list]
      [/@cms_lucene_page]   
         [/#if]  
  </div>

 

效果截图:


 

 

JEECMS v6版标签之[@cms_lucene_list]

 

搜索结果列表标签

参数详解

q: 搜索关键字

siteId:站点ID

channeled:栏目ID

startDate::开始时间

endDate:结束时间

作用:对搜索结果列表

具体例子:

<div class="w96" style="min-height:500px;">
   [#if q??]
   
   [@cms_lucene_list q=q channelId=channelId descLen='100' append='...' count='4' sysPage='1'  ]
      <div class="search_msg">
    您搜索的<span class="red">“${q!}”</span>,共有<span class="red">${tag_list?size} 条</span>查询结果,[@process_time/]
   </div>
   [#list tag_list as s]
       <dl class="list3">
    <dt><span>[<a href="${s.ctgUrl}" target="_blank">${s.ctgName}</a>]</span>  <a href="${s.url}" title="${s.title}" target="_blank">${s.title}</a></dt>
    <dd class="zy">[@text_cut s=s.description len=descLen append=append/]</dd>
    <dd>来源:<a href="${s.originUrl!}" target="_blank">${s.origin!'本站原创'}</a>   浏览次数:${s.views}次   发布时间: ${s.releaseDate} </dd>
    </dl>
    [/#list]
      [/@cms_lucene_list]   
         [/#if]  
  </div>

效果截图:

 


 

 

JEECMS v6版标签之[@cms_Include]

页面模板包含标签:

 

作用:把做好的页面引入到另外一个页面上去,一般是整个网站的一些公共部分,每个网页都需要的,比如页头,页脚。

具体例子:

 

 

示例:

 [#include "../include/页头顶栏.html"/]

 [#include "../include/页头导航栏.html"/]

 [#include "../include/页头搜索栏.html"/]

效果截图:

 

 

JEECMS v6版标签之[@cms_guestbook_list]

 

留言列表标签:

参数详解

siteId:站点ID

ctgId:类别ID,用于调用不同类别

checked:是否审核后显示。0,不审核 1,审核默认是不审核

具体例子:

<div class="blue_right_top mt5"><h2><a href="${base}/guestbook.jspx" target="_blank">网友留言</a></h2></div>
 <div class="blue_right_div" style="height:280px;">
     <div class="w96">
  [@cms_guestbook_list count='10']
   [#list tag_list as m]
   <dl class="gb">
    <dt><span>[${m.ctg.name!}]</span>${m.titleHtml!}</dt>
    <dd>${m.contentHtml!}</dd>
     </dl>
   [/#list]     
   [/@cms_guestbook_list] 
   </div>

JEECMS v6版标签之[@cms_content_page]

内容列表分页标签:

参数详解:

tagId: TAG ID 允许多个TAG ID,用“,”分开。和tagNames之间二选一,ID优先级更高

tagName: TAG NAME 允许多个TAG NAME ,用“,”分开

topicId:专题ID

channelId : 栏目ID,允许多个栏目ID,用“,”分开。和channelpath之间二选一,ID优先级更高

channelPath : 栏目路径,允许多个栏目路径,用“,”分开

channelOption : 栏目选项,用于单栏目情况下。 0 :自身栏目 1 :包含子栏目 2: 包含副栏目

siteId:站点ID,可选,允许多个站点ID,用“,”分开

typeId:类型ID,可选,允许多个类型ID,用“,”分开

Recommend:是否推荐。 0 :所有都推荐 1 :推荐 2 :不推荐,默认所有

title:标题,可以为null

image:标题图片, 0 :所有 1 :有 2 :没有。默认所有

orderBy :排序方式 0:ID降序 1:ID升序 2:发布时间降序 3:发布时间升序 4:固定级别降序,发布时间降序 5:固定级别降序,发布时间升序 6:日访问降序(推荐)7:周访问降序 8:月访问降序 9:总访问降序 10:日评论降序(推荐) 11:周评论降序 12:月评论降序 13:总评论降序 14:日下载降序(推荐)15:周下载降序 16:月下载降序 17:总下载降序 18:日顶降序(推荐) 19:周顶降序 20:月顶降序 21:总顶降序

excludeId:不包含的文章ID,用于按tag查询相关文章

 

作用:对显示的文章列表进行分页

 

具体例子:

[@cms_content_page channelId=channel.id count='4' sysPage=’1’ titLen='15' append='...' orderBy='2' dateFormat='MM-dd' channelOptinotallow='1']
[#list tag_pagination.list as a]
<ul><li>
<a href="${a.url}" title="${a.title}" target="_blank">[@text_cut s=a.title len=titLen append=append/]</a> [${a.date?string(dateFormat)}]
</li></ul>
[/#list]
[/@cms_content_page]

JEECMS v6版标签之[@cms_content_list]

文章列表标签

 

参数详解:

d:文章ID,允许多个文章的ID,用“,”分开。排斥其他所有删选参数

tagId:TAG ID 允许多个TAG ID,用“,”分开。和tagNames之间二选一,ID优先级更高。

tagName: TAG NAME 允许多个TAG NAME ,用“,”分开。

topicId:专题ID

channelId:

channelId:栏目ID,允许多个栏目ID,用“,”分开。和channelpath之间二选一,ID优先级更高。

channelPath:栏目路径,允许多个栏目路径,用“,”分开。

channelOption:栏目选项,用于单栏目情况下。 0 :自身栏目 1 :包含子栏目 2: 包含副栏目

siteId:站点ID,可选,允许多个站点ID,用“,”分开。

typeId:类型ID,可选,允许多个类型ID,用“,”分开。

Recommend:是否推荐。 0 :所有都推荐 1 :推荐 2 :不推荐,默认所有

title:标题,可以为null

image

image:标题图片, 0 :所有 1 :有 2 :没有。默认所有

orderBy :排序方式 0:ID降序1:ID升序 2:发布时间降序 3:发布时间升序 4:固定级别降序,发布时间降序 5:固定级别降序,发布时间升序 6:日访问降序(推荐)7:周访问降序 8:月访问降序 9:总访问降序 10:日评论降序(推荐) 11:周评论降序 12:月评论降序 13:总评论降序 14:日下载降序(推荐)15:周下载降序 16:月下载降序 17:总下载降序 18:日顶降序(推荐) 19:周顶降序 20:月顶降序 21:总顶降序

excludeId:不包含的文章ID,用于按tag查询相关文章

style_list:文章列表显示样式

文字列表

lineHeight:行高;【行高】

headMarkImg: 列表头图片;【图片地址】

headMark: 列表头编号;【1:小黑点;2:小红点;3:单箭头;4:双箭头】

bottomLine: 下划线;【0:无;1:有】不能为空。

dateFormat: 日期格式;【java日期格式,如:yyyy-MM-dd】

datePosition: 日期位置;【1:后面左边;2:后面右边;3:前面】不能为空

ctgForm: 类别;【0:无;1:栏目;2:站点】不能为空

showTitleStyle:显示标题样式;【0:不显示;1:显示】不能为空

useShortTitle: 是否使用简短标题;【0:不使用;1:使用】不能为空

titLen: 标题长度;【英文字母按半个计算】为空则不截断

target: 是否新窗口打开;【0:原窗口;1:新窗口】不能为空

styleList:文章列表显示样式

具体例子:

<div class="w250 fr">
  <div class="rb_right_top"><h2><a href="#" target="_blank">热门资讯排行榜</a></h2></div>
 <div class="rb_right_div">  
  <ul class="order">
    [@cms_content_list count='10' titLen='15' orderBy='9' channelOptinotallow='1']
    [#list tag_list as a]
    <li><a href="${a.url}" title="${a.title}" target="_blank">[@text_cut s=a.title len=titLen append=append/]</a></li>
    [/#list]
    [/@cms_content_list]
  </ul>
 </div>
 <div class="rb_right_low"></div>
</div>
 <div class="rb_right_div">  
  <ul class="order">
    [@cms_content_list count='10' titLen='15' orderBy='9' channelOptinotallow='1']
    [#list tag_list as a]
    <li><a href="${a.url}" title="${a.title}" target="_blank">[@text_cut s=a.title len=titLen append=append/]</a></li>
    [/#list]
    [/@cms_content_list]
  </ul>
 </div>
 <div class="rb_right_low"></div>
</div>

JEECMS v6 版标签之[@cms_Content]

文章标签对象

 

参数详解:

id: 文章ID

next:下一篇

channeled:l栏目ID

作用:显示某篇文章

具体例子:

<div class="other box" align="center">
            <div class="ding fl" οnclick="Cms.up('${base}',${content.id},${content.ups});"><span id="ups"></span>
              <p>顶</p>
            </div>
            <div class="cai fl" οnclick="Cms.down('${base}',${content.id},${content.downs});"><span id="downs"></span>
              <p>踩</p>
            </div>
            <ul>
              <li><strong>上一篇:</strong>[@cms_content id=content.id next='1' channelId=channel.id][#if tag_bean??]<a href="${tag_bean.url}">${tag_bean.title}</a>[#else]没有了[/#if][/@cms_content]</li>
              <li><strong>下一篇:</strong>[@cms_content id=content.id next='0' channelId=channel.id][#if tag_bean??]<a href="${tag_bean.url}">${tag_bean.title}</a>[#else]没有了[/#if][/@cms_content]</li>
            </ul>
          </div>

JEECMS v6版标签之[@cms_vote]

投票标签

参数详解:

id:投票ID 可以为空,为空则获取站点的默认投票

siteId:站点ID  默认为当前站点

作用:实现网络调查投票模块

 

具体例子:

<div class="w250 fr">
  <div class="pink_right_top"><h2><a href="#">网友投票</a></h2></div>
 <div class="pink_right_div" style="min-height:240px;">
 <div class="w98">
 [@cms_vote]
 [#if !tag_bean??]
<div>没有默认投票主题</div>
[#else]
<form name="votes" actinotallow="${base}/vote.jspx" method="post" target="_blank">
  <table width="100%" border="0" cellspacing="5" cellpadding="0">
    <tr>
      <td height="30" colspan="2" align="left">${tag_bean.title?html}
        <input type="hidden" name="voteId" value="${tag_bean.id}"/></td>
    </tr>
    [#if tag_bean.multiSelect gt 1]
    [#list tag_bean.items as item]
    <tr>
      <td width="9%" height="20" align="center"><input type="checkbox" name="itemIds" value="${item.id}" notallow="check_votes(${tag_bean.multiSelect})" id="${item.id}"/></td>
      <td width="91%" align="left">${item.title?html}</td>
    </tr>
    [/#list]
    [#else]
    [#list tag_bean.items as item]
    <tr>
      <td width="9%" height="20" align="center"><input type="radio" name="itemIds" value="${item.id}"/></td>
      <td width="91%" align="left">${item.title?html}</td>
    </tr>
    [/#list]
    [/#if]
    <tr>
      <td height="30" colspan="2" align="center"><input type="submit" value="投票" notallow="return check_votes(${tag_bean.multiSelect})"/>
          <a href="${base}/vote_result.jspx?voteId=${tag_bean.id}" target="_blank">查看投票结果</a></td>
    </tr>
  </table>
</form>
[/#if]
[/@cms_vote]
 </div>
 </div>
 <div class="pink_right_low"></div>
</div>
</div>

JEECMS v6版标签之[@cms_Topic_page]

专题分页标签

 

参数详解:

 

channelId:栏目ID

recommend:是否推荐

作用:对页面显示的专题列表进行分页

具体例子:

<div class="pagebar" style="margin:30px auto;"> 
    [@cms_topic_page count='2' descLen='50' append='...']
  <div class="pagebar" >
      [#list tag_pagination.list as t]
   <dl class="list line zt">
    <dt><a href="${base}/topic/${t.id}.jspx" target="_blank">${t.name}</a></dt>
    <dd class="pic"><a href="${base}/topic/${t.id}.jspx"><img src="${t.titleImg!site.defImg}"/></a></dd>
    <dd class="text">[@text_cut s=t.description len=descLen append=append/]</dd>
   </dl>    
   [/#list]
  </div>
        <div>[@cms_pagination sysPage='1'/]</div>
        [/@cms_topic_page]    
</div>

 

JEECMS v6版标签之[@cms_Topic_list]

专题列表标签

参数详解:

 

channelId:栏目ID

recommend:是否推荐

作用:显示专题列表

 

具体例子:

<table width="980" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
 <td align="right"  background="/${res}/img/topic/lmbj.gif"><img src="/${res}/img/topic/lm_2.gif"/></td>
  <td width="990" align="left" background="/${res}/img/topic/lmbj.gif"><h2>热门专题</h2></td>
  </tr>
  <tr>
            <td colspan="2" bgcolor="#FFFFFF">    
     [@cms_topic_list count='4' descLen='36' append='...']
     [#list tag_list as t] 
   <dl class="list line zt box">
    <dt><a href="${base}/topic/${t.id}.jspx" target="_blank">${t.name}</a></dt>
    <dd class="pic"><a href="${base}/topic/${t.id}.jspx"><img src="${t.titleImg!site.defImg}"/></a></dd>
    <dd class="text">[@text_cut s=t.description len=descLen append=append/]</dd>
   </dl>
     [/#list]
        [/@cms_topic_list]   
   </td>
          </tr>
</table>

JEECMS v6版标签之[@cms_comment_page]

评论分页标签

参数详解:

 

siteId:站点id

contentId:内容ID

greaterThen: 评论内容最大支持大于多少

checked: 是否需要审核

recommend:是否推荐

orderBy:排列顺序:0 :按评论时间降序 1 :按评论时间升序。默认降序

作用:对评论列表进行分页

具体例子:

 

<div class="pagebar">
   [@cms_comment_page cnotallow=contentId count='6' orderBy='1']   
          <dl class="rmpl">
            [#if tag_pagination.list?size = 0]
            <dt><span>暂无相关评论!</span></dt>
      [#else]
      [#list tag_pagination.list as c]
     <dt><span>${(c.commentUser.username)!"匿名网友"}</span>于 ${c.createTime} 评论道:</dt>
     <dd>${c.textHtml!}</dd>
     <dd class="line"></dd>
   [/#list]
<div class="pagebar">[@cms_pagination sysPage='1'/]</div>
            [/#if]
          </dl>    
          [/@cms_comment_page]   
   </div>

 

JEECMS v6版标签之[@cms_comment_list]

评论列表标签

参数详解:

 

siteId:站点id

contentId:内容ID

greaterThen: 评论内容最大支持大于多少

checked: 是否需要审核

recommend:是否推荐

orderBy:排列顺序:0 :按评论时间降序 1 :按评论时间升序。默认降序

作用:显示评论列表

具体例子:

<div class="blue_right_top"><h2><a href="#" target="_blank">热门评论</a></h2></div>
 <div class="blue_right_div">
  [@cms_comment_list siteId='1' count='5' recommend='1' textLen='50' append='...']
  <dl class="rmpl">
  [#list tag_list as c]
   <dt><span>${(c.commentUser.username)!"匿名网友"}</span>对<a href="${c.content.url}" target="_blank">${c.content.title}</a>评论道:</dt>
   <dd>[@text_cut s=c.textHtml len=textLen append=append/]</dd>
   <dd class="line"></dd>
  [/#list]
  </dl>
  [/@cms_comment_list]
 </div>

JEECMS v6版标签之[@cms_channel]

栏目对象标签

参数详解:

id:栏目ID

path:栏目路径

siteId: 站点ID,存在时获取该站点栏目,不存在时获取当前站点栏目

具体例子:

@cms_channel id='1']
<ahref="${tag_bean.url}" target="_blank">${tag_bean.name}</a>
[/@cms_channel]