[#-- 栏目翻页样式
pageClass: 翻页DIV class pageStyle: 翻页DIV style --] [#assign p=tag_pagination/] <div class="pagesize"> [#if p.firstPage] <a disabled="disabled">首页</a> <a disabled="disabled">上一页</a>[#t/] [#else] <a href="#" οnclick="location.href=encodeURI('${hrefFormer}${hrefLatter}');">首页</a> <a href="#" οnclick="location.href=encodeURI('${hrefFormer}[#if p.prePage gt 1]_${p.prePage}[/#if]${hrefLatter}');">上一页</a>[#t/] [/#if] [#list 1..p.totalPage as i] <a href="#" οnclick="location.href=encodeURI('${hrefFormer}_${i}${hrefLatter}');"[#if p.pageNo==i] class="page_current"[/#if]>${i}</a> [/#list] [#if p.lastPage] <a disabled="disabled">下一页</a> <a disabled="disabled">尾页</a> [#else] <a href="#" οnclick="location.href=encodeURI('${hrefFormer}_${p.nextPage}${hrefLatter}');">下一页</a> <a href="#" οnclick="location.href=encodeURI('${hrefFormer}_${p.totalPage}${hrefLatter}');">尾页</a> [/#if] </div> 3、栏目分页列表实例标签 <div class="news_cont"> [@cms_content_list channelId=channel.id count='1' Recommend='1' titLen='30' descLen='80' append='...' orderBy='2' dateFormat='yyyy-MM-dd'] [#list tag_list as a] <dl> <dt><a href="${a.url}"><img src="${a.typeImg!site.defImg}" width="149" height="110"></a></dt> <dd> <h3><span>${a.date?string(dateFormat)}</span><a href="${a.url}">[@text_cut s=a.title len=titLen append=append /]</a></h3> <p>[@text_cut s=a.desc len=descLen append=append/]</p> <p><a href="${a.url}">[+查看详细]</a></p> </dd> </dl> [/#list] [/@cms_content_list] [@cms_content_page channelId=channel.id count='12' sysPage='2' titLen='40' append='...' orderBy='2' dateFormat='yyyy-MM-dd' channelOption='1'] <ul class="news_ul"> [#list tag_pagination.list as a] <li><span>${a.date?string(dateFormat)}</span><a href="${a.url}">[@text_cut s=a.title len=titLen append=append /]</a></li> [/#list] </ul> [/@cms_content_page] </div> 4、栏目分页列表调用附件 [@cms_content_page channelId=channel.id count='12' sysPage='2' titLen='40' append='...' orderBy='2' dateFormat='yyyy-MM-dd' channelOption='1'] <ul class="download_ul"> [#list tag_pagination.list as a] [#if a.attachments?size == 1] [#list a.attachments as attach] <li> <a href="${attach.path}" title="${attach.name}">[点击下载]</a>[@text_cut s=a.title len=titLen append=append /]</li> [/#list] [/#if] [/#list] </ul> [/@cms_content_page] 5、内容页调用附件 <script type="text/javascript"> $(function() { Cms.attachment("${base}","${content.id}","${content.attachments?size}","attach"); }); </script> <div class="show_cont_info"> [#if content.attachments?size gt 0] [#list content.attachments as attach] <p><a id="attach${attach_index}">附件文档:${attach.name!}</a></p> [/#list] [/#if] </div> 6、后台文章不计数的问题(在内容页加下面代码) <script type="text/javascript"> $(function() { Cms.viewCount("${base}","${content.id}"); }); </script> 7、[#if] [#else] [/#if] 的使用 [#list tag_pagination.list as a] <ul class="news_ul"> [#if "${a_index+1}"="1"] <li class="xxxx"> <span>${a.date?string(dateFormat)}</span><a href="${a.url}" target="_blank">[@text_cut s=a.title len=titLen append=append/]</a> </li> [#else] <li> <span>${a.date?string(dateFormat)}</span><a href="${a.url}" target="_blank">[@text_cut s=a.title len=titLen append=append/]</a> </li> [/#if] </ul> [/#list] 8、内容页使用分页的标签 <div class="pagebar">[#include "../style_page/content.html"/]</div>