首页 index.html site :站点对象
栏目 cover.html list.html node :栏目对象, text :正文
详细 info.html node :栏目对象, info :文档对象, title标题, text:正文

一、index.html
1、首页title内容 ${site.fullNameOrName}
<meta name="keywords" content="${node.keywords}"/>
<meta name="description" content="${node.description}"/>

2、动态包含: [#include 'inc_js.html'/]
3、热度排行代码:
获得所有文档列表
<ul class="list-unstyled" style="padding:10px;">
[@InfoList sort='views desc' limit='10';list]
[#list list as info]
<li style="height:28px;line-height:28px;"><span class="left text-center [#if info_index<3]rank-top[#else]rank-normal[/#if]" style="margin-right:10px;">${info_index+1}</span><a class="a fs14" href="${info.url}" target="_blank" title="${info.title}">${substring(info.title,18,'...')}</a></li>
[/#list]
[/@InfoList]
</ul>
${info_index+1} 信息数目
${substring(info.title,18,'...')} 信息的标题
${info.url} 内容的链接地址

4、获得栏目对象 (栏目)
<a class="b c-node fs14 a-hover" href="${getNode('trade').url}">${getNode('trade').name}</a>
7、获取单个指定的栏目 (栏目)
[@Node number='trade';node]<a class="c-node fs14 b a-hover" href="${node.url}">${node.name}</a>[/@Node]

5、获得文档属性为头条的列表 (头条属性下的文档列表)
第一条
往后的2,3条列表
[@InfoList attr='headlines' limit='3';list]
[#if list?size > 0]
<div class="text-center" style="height:38px;line-height:38px;">
<a class="fs14 b a-hover c-infoem" href="${list[0].url}" target="_blank" title="${list[0].title}">${substring(list[0].title,18,'...')}</a>
</div>
[/#if]

<ul class="list-unstyled text-center" style="height:30px;line-height:30px;">
[#list list as info]
[#if info_index > 0]
<li class="left" style="width:50%;">[<a class="a-hover c-infoem" href="${info.url}" target="_blank" title="${info.title}">${substring(info.title,11,'...')}</a>]</li>
[/#if]
[/#list]
</ul>
[/@InfoList]

trade
6、获取新闻栏目文档 (栏目下文档列表)
[@InfoList node='news' isIncludeChildren='true' limit='14';list]
[#list list as info]
<li class="item ico-point-blue">
<a class="fs14 [#if info_index=4 || info_index=9 || info.strong] c-infoem a-hover b[#else]a[/#if]" href="${info.url}" target="_blank" title="${info.title}">${substring(info.title,20,'...')}</a>
</li>
[#if info_index = 3 || info_index = 8]
<li class="spacing"></li>
[/#if]
[/#list]
[/@InfoList]

8、获得指定栏目列表 同6一样。(文档)
[@InfoList node='video' isIncludeChildren='true' limit='2';list]
[#list list as info]
<li class="[#if info_index % 2 = 0]left[#else]right[/#if]" style="width:132px;">
<a class="block relative" style="width:132px;height:88px;" href="${info.url}" target="_blank" title="${info.title}">
<img src="${info.smallImageUrl}" width="132" height="88"/>
<div class="trans c-000 absolute" style="bottom:0;height:22px;line-height:22px;width:100%;">
<div class="relative c-fff text-right play">&nbsp;${info.videoTime}</div>
</div>
</a>
<div class="text-center" style="height:28px;line-height:28px;"><a class="fs12 a" href="${info.url}" target="_blank" title="${info.title}">${substring(info.title,9,'...')}</a></div>
</li>
[/#list]
<div class="clear"></div>
[/@InfoList]

9、获得一个专题
[@SpecialList limit='1';list]
[#list list as special]
<div style="padding:10px;">
<a class="left" style="width:130px;" href="${ctx}/special/${special.id}.jspx" target="_blank" title="${special.title}">
<img src="${special.smallImageUrl}" width="130" height="87"/>
</a>
<div class="right" style="width:158px;margin-left:10px;">
<div><a class="fs14 b a-hover c-infoem" href="${ctx}/special/${special.id}.jspx" title="${special.title}" target="_blank">${substring(special.title,10,'...')}</a></div>
<div class="mt5 c-desc">${substring(special.description,32,'...')} <a class="c-node a-all" href="${ctx}/special/${special.id}.jspx" target="_blank">[详细]</a></div>
</div>
<div class="clear"></div>
</div>
[/#list]
[/@SpecialList]

10、获得除第一个专题外其他专题(专题)
[@SpecialList offset='1' limit='6';list]
<ul class="mt5 list-unstyled" style="padding:10px 10px;border-top:1px dotted #d2e1f1;">
[#list list as special]
<li style="height:26px;line-height:26px;"><a class="fs14 a" href="${ctx}/special/${special.id}.jspx" target="_blank" title="${special.title}">${substring(special.title,20,'...')}</a></li>
[/#list]
</ul>
[/@SpecialList]

11、获取新闻栏目 子栏目列表
带图片的一条
其他子栏目不带图片的列表

[@NodeList parent='news';list]
[#list list as node]
<div class="w1 [#if node_index%2 = 0]left[#else]right ml20[/#if]">
<div class="box1">
<div class="head"><a class="b c-node fs14 a-hover" href="${node.url}">${node.name}</a></div>
</div>
[@InfoList nodeId=node.id isWithImage='true' limit='1';list]
[#list list as info]
<div style="padding:10px;">
<a class="left" style="width:130px;" href="${info.url}" target="_blank" title="${info.title}">
<img src="${info.smallImageUrl}" width="130" height="87"/>
</a>
<div class="right" style="width:158px;margin-left:10px;">
<div><a class="fs14 b a-hover c-infoem" href="${info.url}" title="${info.title}" target="_blank">${substring(info.title,10,'...')}</a></div>
<div class="mt5 c-desc">${substring(info.description,32,'...')} <a class="c-node a-all" href="${info.url}" target="_blank">[详细]</a></div>
</div>
<div class="clear"></div>
</div>
[/#list]
[/@InfoList]
[@InfoList nodeId=node.id limit='5';list]
<ul class="mt5 list-unstyled" style="padding:10px 10px;border-top:1px dotted #d2e1f1;">
[#list list as info]
<li class="ico-point-blue" style="padding-left:10px;height:26px;line-height:26px;"><a class="fs14 a" href="${info.url}" target="_blank" title="${info.title}">${substring(info.title,20,'...')}</a></li>
[/#list]
</ul>
[/@InfoList]
</div>
[/#list]
<div class="clear"></div>
[/@NodeList]

12、获得文旦属于下载栏目
1、子栏目的名称${info.node.name}
2、字段 ${info.customs['star']}

[@InfoList node='download' isIncludeChildren='true' limit='9';list]
[#list list as info]
<li class="left" style="width:193px;padding-right:20px;">
<div class="left" style="padding:10px;"><img src="${info.smallImageUrl}" width="50" height="50"/></div>
<div class="left" style="padding-top:6px;width:123px;">
<div><a class="fs14 b c-infoem a-hover" href="${info.url}" target="_blank" title="${info.title}">${substring(info.title,10)}</a></div>
<div><a class="a" href="${info.node.url}">${info.node.name}</a></div>
<div style="color:#fe6500;">${info.customs['star']}</div>
</div>
<div class="clear"></div>
</li>
[/#list]
[/@InfoList]
13、投票

[@Vote;vote]
[#if vote??]
<div class="text-center" style="padding:5px 10px;"><a class="c-infoem fs14 a-hover" href="${ctx}/vote.jspx?id=${vote.id}" target="_blank">${vote.title?html}</a></div>
<form action="${ctx}/vote.jspx" method="post" id="voteForm">
<input type="hidden" name="id" value="${vote.id}"/>
<ul class="list-unstyled">
<label for="optionIds" class="hide error"></label>
[#list vote.options as option]
<li style="padding:5px 0;"><label><input type="[#if vote.maxSelected==1]radio[#else]checkbox[/#if]" name="optionIds" value="${option.id}" class="required" data-msg-required="请至少选择一项"/> ${option.title}</label></li>
[/#list]
</ul>
<input type="hidden" name="status_560" value="您已经投过票了"/>
<input type="hidden" name="redirectUrl" value="${ctx}/vote/{id}.jspx"/>
<div class="text-center" style="padding:10px 0 20px 0;">
<input type="submit" value="投票"/> &nbsp;
<a class="a fs14" href="${ctx}/vote/${vote.id}.jspx" target="_blank">查看结果</a>
</div>
</form>
<script>
$(function() {
$("#voteForm").validate();
});
</script>
[#else]
<div>没有投票</div>
[/#if]
[/@Vote]

14、获得当前页

<a class="right block" style="width:228px;height:90px;background:url(_files/img/logo.png) no-repeat;" href="${ctx}/"></a>

15、获得栏目列表(栏目)

[@NodeList;list]
[#list list as n]
<li class="left"><a href="${n.url}" class="nava fs14 item[#if (node.hierarchy[1])?? && node.hierarchy[1].id == n.id] curr[/#if][#if n_has_next] middle[#else] last[/#if]">${n.name}</a></li>
[/#list]
[/@NodeList]

cover.html

1、获得栏目
${n.name} 子栏目
${n.url} 子栏目地址

[@NodeList parentId=node.id;list]
[#list list as n]
<div class="w center mt30" style="height:22px;line-height:22px;background:url(_files/img/phone_bg.jpg) right center no-repeat;">
<div class="left ff-yh fs18" style="width:100px;border-left:7px solid #e71a21;padding-left:18px;">${n.name}</div>
<div class="right" style="width:100px;padding-right:18px;text-align:right;"><a href="${n.url}" class="a-hover c-666">更多</a></div>
<div class="clear"></div>
</div>
<div class="w center mt20">
[@InfoList nodeId=n.id limit='8';list]
[#list list as info]
<div class="left mt5 relative" style="[#if (info_index+1) % 4 !=0]margin-right:5px;[/#if]">
<a href="${info.url}" target="_blank" title="${info.title}">
<img src="${info.smallImageUrl}" width="246" height="164"/>
<div class="absolute" style="width:100%;height:75px;bottom:0;background:url(_files/img/pic_bg.png) left bottom;"></div>
<div class="absolute text-center ff-yh fs14" style="bottom:5px;width:100%;text-align:center;">
<span class="relative c-fff">${substring(info.title,15,'...')}</span>
</div>
</a>
</div>
[/#list]
[/@InfoList]
<div class="clear"></div>
</div>
[/#list]
[/@NodeList]

list.html

1、所有文档内容 列表 分页

[@InfoPage nodeId=node.id pageSize='15';pagedList]
<ul class="list-unstyled mt10">
[#list pagedList.content as info]
<li style="padding:15px 0;border-bottom:1px dotted #ccc;">
[#if info.withImage]
<div class="left" style="padding:3px 10px 3px 0;width:22%;">
<a href="${info.url}" target="_blank"><img src="${info.smallImageUrl}" width="138" height="92"/></a>
</div>
[/#if]
<div class="left" style="[#if info.withImage]width:75%;[/#if]">
<div>[@A bean=info class='ff-yh fs18 a c-000' target="_blank"/]</div>
<div class="" style="line-height:1.8;padding:2px 0;color:#818181;">${substring(info.description,100,'...')}</div>
<div class="" style="padding:2px;color:#a1a1a1;">${info.publishDate?string('yyyy-MM-dd HH:mm:ss')}</div>
</div>
<div class="clear"></div>
</li>
[/#list]
</ul>
<table class="center mt20"><tr><td>
[#include 'page.html'/]
</td></tr></table>
[/@InfoPage]

info.html

1、获得栏目
[#list node.hierarchy as n]<a href="${n.url}" class="a c-desc">${n.name}</a> > [/#list]
2、编辑时间
<span class="info-detail">${info.publishDate?string('yyyy-MM-dd')}</span>
3、作者
<span class="info-detail">${info.author!info.creator.realName!info.creator.username}</span>

[#include "_include/include_footer.html"/]
[@InfoFulltextList q=info.title excludeId=info.id limit=5;list]
<ul class="list-unstyled info-list fs14 mt10">
[#list list as fulltextInfo]
<li class="item ico-point-blue" >[@A bean=fulltextInfo target="_blank" class="a"/] <span class="fs12 c-999 ml5">${fulltextInfo.publishDate?string('yyyy-MM-dd')}</span></li>
[/#list]
</ul>
[/@InfoFulltextList]

模块里建立:
1、专题类别 国际

2、专题管理

马航客机失联
马航客机失联,MH370,马来西亚,飞机,北京,失联
马来西亚航空公司8日凌晨,与一架载有239人的飞机失去联系。这架航班上共载227名乘客,含154名中国人。客机系波音777-200型号,计划于北京时间6:30分抵达北京。

2014索契冬奥会
冬奥会, 2014冬奥会,索契冬奥会,2014索契冬奥会, 第22届冬奥会, 冬季奥林匹克运动会
第22届冬季奥林匹克运动会于2014年2月7日~23日召开

小图

专题列表
[@SpecialList limit='1';list]
[#list list as special]
${ctx}/special/${special.id}.jspx
标题 ${substring(special.title,10,'...')}
内容 ${substring(special.description,32,'...')}
[/#list]
[/@SpecialList]

jspxcms笔记三的更多相关文章

  1. Oracle学习笔记三 SQL命令

    SQL简介 SQL 支持下列类别的命令: 1.数据定义语言(DDL) 2.数据操纵语言(DML) 3.事务控制语言(TCL) 4.数据控制语言(DCL)  

  2. 《CMake实践》笔记三:构建静态库(.a) 与 动态库(.so) 及 如何使用外部共享库和头文件

    <CMake实践>笔记一:PROJECT/MESSAGE/ADD_EXECUTABLE <CMake实践>笔记二:INSTALL/CMAKE_INSTALL_PREFIX &l ...

  3. Mastering Web Application Development with AngularJS 读书笔记(三)

    第一章笔记 (三) 一.Factories factory 方法是创建对象的另一种方式,与service相比更灵活,因为可以注册可任何任意对象创造功能.例如: myMod.factory('notif ...

  4. Python 学习笔记三

    笔记三:函数 笔记二已取消置顶链接地址:http://www.cnblogs.com/dzzy/p/5289186.html 函数的作用: 給代码段命名,就像变量給数字命名一样 可以接收参数,像arg ...

  5. 《MFC游戏开发》笔记三 游戏贴图与透明特效的实现

    本系列文章由七十一雾央编写,转载请注明出处. 313239 作者:七十一雾央 新浪微博:http://weibo.com/1689160943/profile?rightmod=1&wvr=5 ...

  6. [Firefly引擎][学习笔记三][已完结]所需模块封装

    原地址:http://www.9miao.com/question-15-54671.html 学习笔记一传送门学习笔记二传送门 学习笔记三导读:        笔记三主要就是各个模块的封装了,这里贴 ...

  7. JSP学习笔记(三):简单的Tomcat Web服务器

    注意:每次对Tomcat配置文件进行修改后,必须重启Tomcat 在E盘的DATA文件夹中创建TomcatDemo文件夹,并将Tomcat安装路径下的webapps/ROOT中的WEB-INF文件夹复 ...

  8. 构建高性能WEB站点笔记三

    构建高性能WEB站点笔记三 第10章 分布式缓存 10.1数据库的前端缓存区 文件系统内核缓冲区,位于物理内存的内核地址空间,除了使用O_DIRECT标记打开的文件以外,所有对磁盘文件的读写操作都要经 ...

  9. Git 笔记三 Git的初步使用

    Git 笔记三 Git的初步使用 在上一篇中,学习了如何配置Git环境,这一篇,开始学习Git的初步使用.Git的初步使用还是很简单的.总体上知道git init, git clone, git ad ...

随机推荐

  1. 相似度模型 similarity model

    Lucene4.0附加了相似度模型,允许在文档中使用不同的公式.

  2. Bootstrap支持的JavaScript插件

    1.导入JavaScript插件 Bootstrap除了包含丰富的Web组件之外,如前面介绍的下拉菜单.按钮组.导航.分页等.他还包括一些JavaScript的插件. Bootstrap的JavaSc ...

  3. QChart 如何放大缩小?

    #if 0 //QChart 放大缩小 double z = 1.0; QPoint numDegrees = e->angleDelta()/8; double zi = qAbs(0.1*n ...

  4. centos7 安装vue

    1: npm安装: 2: 报错:  bash: vue: command not found 执行npm install --global vue-cli 后 执行 vue 报错 bash: vue: ...

  5. ZFIR_001 ole下载

    *&---------------------------------------------------------------------** Report ZFIR_001* Appli ...

  6. Python基础-常用的内置函数

    内置函数filter str = ['a', 'b', 'c', 'd'] def fansik(num): if num != "a": return num ret = fil ...

  7. More about Parameter Passing in Python(Mainly about list)

    我之前写了一篇关于Python参数传递(http://www.cnblogs.com/lxw0109/p/python_parameter_passing.html)的博客, 写完之后,我发现我在使用 ...

  8. Apache Shiro:【1】Shiro基础及Web集成

    Apache Shiro:[1]Shiro基础及Web集成 Apache Shiro是什么 Apache Shiro是一个强大且易于使用的Java安全框架,提供了认证.授权.加密.会话管理,与spri ...

  9. Informatica can bind a LONG value only for insert into a LONG column Oracle

    Informatica实现etl同步表数据信息时 报: Severity Timestamp Node Thread Message Code Message ERROR 2016/8/8 17:32 ...

  10. UI设计中的各种小控件

    xib支持图形化操作,提供了几乎所有的控件可供选择,只需拖动到相应的位置即可,但是控件的后台代码仍然需要手动编写,一定程度上加速了前台的开发. xib快速开发程序,手写代码速度比较慢 xib适合做静态 ...