?? common_tag.ftl
字號:
<#--
包含頁面。
value:包含模板的名稱。
websiteRes:頁面站點資源路徑。如:ligirl。(默認0,為本站)。
systemCode:1,文章系統;2,商城系統;3,論壇系統;
isGlobal:是否是全局包含模板。
-->
<#macro Include value websiteRes='0' systemCode='0' isGlobal='0'>
<#if isGlobal=='1'>
<#local systemType=GLOBE_SYS/>
<#elseif systemCode=='1'>
<#local systemType='arti'/>
<#elseif systemCode=='2'>
<#local systemType='shop'/>
<#elseif systemCode=='3'>
<#local systemType='foru'/>
<#else>
<#local systemType=sysType/>
</#if>
<#if websiteRes=='0'>
<#local websiteRes=webRes/>
</#if>
<#include "/${WEBINF}/${TPL_BASE}/${websiteRes}/${systemType}/${value}${TPL_BODY}" />
</#macro>
<#--該標簽小寫開頭,不推薦使用,統一使用大寫開頭標簽-->
<#macro include value websiteRes='0' systemCode='0' isGlobal='0'>
<#if isGlobal=='1'>
<#local systemType=GLOBE_SYS/>
<#elseif systemCode=='1'>
<#local systemType='arti'/>
<#elseif systemCode=='2'>
<#local systemType='shop'/>
<#elseif systemCode=='3'>
<#local systemType='foru'/>
<#else>
<#local systemType=sysType/>
</#if>
<#if websiteRes=='0'>
<#local websiteRes=webRes/>
</#if>
<#include "/${WEBINF}/${TPL_BASE}/${websiteRes}/${systemType}/${value}${TPL_BODY}" />
</#macro>
<#--
當前位置
homepage:首頁顯示方式。【1:站點簡稱;自定義】(默認:首頁)。
title:內容頁顯示方式。【0:不顯示;1:顯示內容標題;自定義】(默認:正文)。
split:分割符號。(默認:>)。
target:是否原窗口打開。【0:原窗口打開;1:新窗口打開】(默認:原窗口打開)。
class:鏈接class。
style:鏈接style。
#暫不開放。isParentWebsite:是否顯示父級站點。
-->
<#macro CurrentPosition
homepage='首頁' title='正文' split='>' isParentWebsite='' target='0' class='' style=''>
<#local c=chnl/>
<#local chnlList=[]/>
<#list 1..100 as i>
<#local chnlList=[c]+chnlList/>
<#if c.parent??>
<#local c=c.parent/>
<#else>
<#break/>
</#if>
</#list>
<#list chnlList as c>
<#if c_index==0>
<a href="${chnl.website.webUrl}"<#t/>
<#if target=='1'> target="_blank"</#if><#if class!=''> class="${class}"</#if><#if style!=''> style="${style}"</#if>><#t/>
<#if homepage=='1'>${chnl.website.shortName}<#else>${homepage}</#if></a> ${split?html} <#t/>
<#else>
<a href="${c.url}"<#t/>
<#if target=='1'> target="_blank"</#if><#if class!=''> class="${class}"</#if><#if style!=''> style="${style}"</#if>><#t/>
${c.name}</a><#if c_has_next> ${split?html} </#if><#t/>
</#if>
</#list>
<#if arti??>
<#if title=='0' || title==''><#elseif title=='1'> ${split?html} ${arti.contentTitle}<#else> ${split?html} ${title}</#if><#t/>
</#if>
<#if product??>
<#if title=='0' || title==''><#elseif title=='1'> ${split?html} ${product.name}<#else> ${split?html} ${title}</#if><#t/>
</#if>
</#macro>
<#--
內容翻頁
content:內容。默認為文章內容。
-->
<#macro ContentPage content=arti>
<#if content.artiPage.totalPage gt 1>
<#if content.artiPage.currentPage gt 1>
<#if content.artiPage.currentPage-1 == 1>
<a href="${pageLink}${pageSuffix}">[上一頁]</a><#lt/>
<#elseif content.artiPage.currentPage-1 gt 1>
<a href="${pageLink}_${content.artiPage.currentPage-1}${pageSuffix}">[上一頁]</a><#lt/>
</#if>
</#if>
<#list 1..content.artiPage.totalPage as i>
<#if i==1>
<a href="${pageLink}${pageSuffix}">[<#t/>
<#else>
<a href="${pageLink}_${i}${pageSuffix}">[<#t/>
</#if>
<#if content.artiPage.currentPage = i>
<span style="color: #FF0000;font-weight: bold;">${i}</span><#rt>
<#else>
${i}<#rt>
</#if>
]</a>
</#list>
<#if content.artiPage.currentPage < content.artiPage.totalPage>
<a href="${pageLink}_${content.artiPage.currentPage+1}${pageSuffix}">[下一頁]</a>
</#if>
</#if>
</#macro>
<#--內容列表翻頁-->
<#macro ListPage>
共${pagination.totalCount}條記錄 ${pagination.page}/${pagination.totalPage}頁
<#if pagination.isFirstPage> <a disabled="disabled">首頁</a> <a disabled="disabled">上一頁</a><#t/>
<#else> <a href="${pageLink}${pageSuffix}">首頁</a> <a href="${pageLink}<#if pagination.page-1 gt 1>_${pagination.page-1}</#if>${pageSuffix}">上一頁</a><#t/>
</#if>
<#if pagination.isLastPage> <a disabled="disabled">下一頁</a> <a disabled="disabled">尾頁</a>
<#else> <a href="${pageLink}_${pagination.page+1}${pageSuffix}">下一頁</a> <a href="${pageLink}_${pagination.totalPage}${pageSuffix}">尾頁</a>
</#if>
第<select id="_pagination_selector" onChange="if(this.value==1){location='${pageLink}${pageSuffix}'}else{location='${pageLink}_'+this.value+'${pageSuffix}'}">
<#list 1..pagination.totalPage as i>
<option value="${i}" <#if pagination.page==i>selected="selected"</#if>>${i}</option>
</#list>
</select>頁
</#macro>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -