Freemarker support for MultiPartArticle
git-svn-id: https://svn.libreccm.org/ccm/trunk@5952 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
1b3a6dd87f
commit
92ac2d0cb9
|
|
@ -0,0 +1,22 @@
|
|||
<#ftl ns_prefixes={
|
||||
"bebop":"http://www.arsdigita.com/bebop/1.0",
|
||||
"cms":"http://www.arsdigita.com/cms/1.0",
|
||||
"nav":"http://ccm.redhat.com/navigation",
|
||||
"ui": "http://www.arsdigita.com/ui/1.0"}
|
||||
>
|
||||
|
||||
<#function getSections item>
|
||||
<#return item["./cms:articleSectionPanel/toc/section"]>
|
||||
</#function>
|
||||
|
||||
<#function getSectionTitle section>
|
||||
<#return section>
|
||||
</#function>
|
||||
|
||||
<#function getSectionLink section>
|
||||
<#return section["./@link"]>
|
||||
</#function>
|
||||
|
||||
<#function isActiveSection item section>
|
||||
<#return (section["./@rank"].@@text == item["./rank"].@@text)>
|
||||
</#function>
|
||||
|
|
@ -14,3 +14,52 @@
|
|||
<#return "">
|
||||
</#if>
|
||||
</#function>
|
||||
|
||||
<#function getSections item>
|
||||
<#return item["./cms:articleSectionPanel/cms:item"]>
|
||||
</#function>
|
||||
|
||||
<#function getSectionTitle section>
|
||||
<#return section["./title"]>
|
||||
</#function>
|
||||
|
||||
<#function getSectionContent section>
|
||||
<#return section["./text/content"]>
|
||||
</#function>
|
||||
|
||||
<#function getSectionRank section>
|
||||
<#return section["./rank"]>
|
||||
</#function>
|
||||
|
||||
<#function getPageNumber item>
|
||||
<#return item["./articleSectionPanel/@pageNumber"]>
|
||||
</#function>
|
||||
|
||||
<#function getNumberOfPages item>
|
||||
<#return item["./cms:mpadata/numberOfPages"]>
|
||||
</#function>
|
||||
|
||||
<#function hasPreviousPage item>
|
||||
<#return (item["./cms:articleSectionPanel/@pageNumber"] != "all" && item["./cms:articleSectionPanel/@pageNumber"]?number > 1)>
|
||||
</#function>
|
||||
|
||||
<#function hasNextPage item>
|
||||
<#return (item["./cms:articleSectionPanel/@pageNumber"] != "all" && item["./cms:articleSectionPanel/@pageNumber"]?number < item["./cms:mpadata/numberOfPages"]?number)>
|
||||
</#function>
|
||||
|
||||
<#function hasMultiplePages item>
|
||||
<#return (item["./cms:articleSectionPanel/@pageNumber"] != "all") && item["./cms:articleSectionPanel/@pageNumber"] != "1">
|
||||
</#function>
|
||||
|
||||
<#function getLinkToPreviousPage item>
|
||||
<#return "?page${item['./cms:articleSectionPanel/@pageNumber']?number - 1}">
|
||||
</#function>
|
||||
|
||||
<#function getLinkToNextPage item>
|
||||
<#return "?page${item['./cms:articleSectionPanel/@pageNumber']?number + 1}">
|
||||
</#function>
|
||||
|
||||
<#function getAllSectionsLink item>
|
||||
<#return "?page=all">
|
||||
</#function>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue