首页 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. 集合遍历的时候删除List

    在Java中有时候我们会需要对List里面的符合某种业务的数据进行删除,但是如果不了解里面的机制就容易掉入“陷阱”导致遗漏或者程序异常.本文以代码例子的方式进行说明该问题. 1.采用索引下标遍历的方式 ...

  2. BigDecimal使用整理

    BigDecimal使用整理 一.     BigDecimal简介 计算机计算中无论是float还是double都是浮点数,由于计算机是二进制的,导致在在浮点数计算时会出现精度丢失,因此引入BigD ...

  3. 使用jquery的ajax方法获取下拉列表值

    AJAX 是一种用于创建快速动态网页的技术. 通过在后台与服务器进行少量数据交换,AJAX 可以使网页实现异步更新.这意味着可以在不重新加载整个网页的情况下,对网页的某部分进行更新,用户体验非常好. ...

  4. Servlet学习笔记【2】---Http数据包

    本文主要讲Http协议相关知识. 1 Http协议特点 单向性:客户端和服务端是单向通信的,只有客户端发请求,服务端才会响应产生.(异于推送模式) 无状态:协议本身并没有状态的记录,当客户端多次访问服 ...

  5. 如何枚举 Windows 顶级桌面窗口?

    bool is_top_level_window(HWND hwnd) { if (!IsWindow(hwnd)) return false; DWORD dw_style = GetWindowL ...

  6. Python如何实现单例模式?其他23种设计模式python如何实现?

    #使用__metaclass__(元类)的高级python用法 class Singleton2(type): def __init__(cls, name, bases, dict): super( ...

  7. 【JDBC】java程序通过jdbc连接oracle数据库方法

    版权声明:本文为博主原创文章(原文:blog.csdn.net/clark_xu 徐长亮的专栏).未经博主同意不得转载. https://blog.csdn.net/u011538954/articl ...

  8. 001-maven下载jar后缀为lastUpdated问题

    问题简述 Maven在下载仓库中找不到相应资源时,网络中断等,会生成一个.lastUpdated为后缀的文件.如果这个文件存在,那么即使换一个有资源的仓库后,Maven依然不会去下载新资源. 解决方案 ...

  9. Nginx配置参数说明

    一.主配置段1.正常运行必备的配置#运行用户和组,组身份可以省略user nginx nginx; #指定nginx守护进程的pid文件pid path/to/nginx.pid; #指定所有work ...

  10. 剑指offer 面试53题

    面试53题: 题目:统计一个数字在排序数组中出现的次数. 思路:二分查找法,分别找到此数字在排序数组中第一次和最后一次出现的位置,然后次数等于两个位置之差加1. 时间复杂度:O(log n) 解题代码 ...