Bugfixes for Freemarker functions
git-svn-id: https://svn.libreccm.org/ccm/trunk@6078 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
41699a4488
commit
4e64dd8def
|
|
@ -20,6 +20,10 @@
|
||||||
<#return model["/bebop:page/nav:categoryPath/nav:category[last()]"]>
|
<#return model["/bebop:page/nav:categoryPath/nav:category[last()]"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#function getSelectedCategoryId>
|
||||||
|
<#return model["/bebop:page/nav:categoryPath/nav:category[last()]/@id"]>
|
||||||
|
</#function>
|
||||||
|
|
||||||
<#--
|
<#--
|
||||||
Get the title of the provided category.
|
Get the title of the provided category.
|
||||||
-->
|
-->
|
||||||
|
|
@ -82,6 +86,10 @@
|
||||||
<#return ofCategory["./nav:category"]>
|
<#return ofCategory["./nav:category"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#function getSubCategoriesOfCategoryWithId categoryId>
|
||||||
|
<#return model["/bebop:page/nav:categoryMenu//nav:category[@id=${categoryId}]/nav:category"]>
|
||||||
|
</#function>
|
||||||
|
|
||||||
<#function getGreetingItem>
|
<#function getGreetingItem>
|
||||||
<#return model["/bebop:page/nav:greetingItem/cms:item"]>
|
<#return model["/bebop:page/nav:greetingItem/cms:item"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getObjectCount listId>
|
<#function getObjectCount listId>
|
||||||
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@objectCount"].@@text?number>
|
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@objectCount"]?number>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getPaginatorBaseUrl listId>
|
<#function getPaginatorBaseUrl listId>
|
||||||
|
|
@ -39,11 +39,11 @@
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getPaginatorBegin listId>
|
<#function getPaginatorBegin listId>
|
||||||
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@objectBegin"].@@text?number>
|
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@objectBegin"]?number>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getPaginatorEnd listId>
|
<#function getPaginatorEnd listId>
|
||||||
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@objectEnd"].@@text?number>
|
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@objectEnd"]?number>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getPageCount listId>
|
<#function getPageCount listId>
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getPageNumber listId>
|
<#function getPageNumber listId>
|
||||||
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageNumber"].@@text?number>
|
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageNumber"]?number>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getPageParam listId>
|
<#function getPageParam listId>
|
||||||
|
|
@ -64,7 +64,7 @@
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getPageSize listId>
|
<#function getPageSize listId>
|
||||||
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageSize"].@@text?number>
|
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageSize"]?number>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getPrevPageLink listId>
|
<#function getPrevPageLink listId>
|
||||||
|
|
@ -100,11 +100,15 @@
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function hasImage item>
|
<#function hasImage item>
|
||||||
<#return (item["./nav:attribute[@name='imageAttachments.image.id']"]?size > 0)>
|
<#return (item["./nav:attribute[@name='imageAttachments.image.id']"]?size > 0 || item["./imageAttachments"]?size > 0)>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getImageId item>
|
<#function getImageId item>
|
||||||
<#return item["./nav:attribute[@name='imageAttachments.image.id'][1]"]>
|
<#if (item["./nav:attribute[@name='imageAttachments.image.id']"]?size > 0)>
|
||||||
|
<#return item["./nav:attribute[@name='imageAttachments.image.id'][1]"]>
|
||||||
|
<#elseif (item["./imageAttachments"]?size > 0)>
|
||||||
|
<#return item["./imageAttachments[1]/image/id"].@@text>
|
||||||
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getImageUrl item>
|
<#function getImageUrl item>
|
||||||
|
|
@ -112,7 +116,11 @@
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getImageCaption item>
|
<#function getImageCaption item>
|
||||||
<#return item["./nav:attribute[@name='imageAttachments.image.caption'][1]"].@@text>
|
<#if (item["./nav:attribute[@name='imageAttachments.image.id']"]?size > 0)>
|
||||||
|
<#return item["./nav:attribute[@name='imageAttachments.image.caption'][1]"].@@text>
|
||||||
|
<#elseif (item["./imageAttachments"]?size > 0)>
|
||||||
|
<#return item["./imageAttachments[1]/image/caption"].@@text>
|
||||||
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getFilters listId>
|
<#function getFilters listId>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
"ui": "http://www.arsdigita.com/ui/1.0"}
|
"ui": "http://www.arsdigita.com/ui/1.0"}
|
||||||
>
|
>
|
||||||
|
|
||||||
<#import ../ccm-cms/content-item.ftl as ContentItem>
|
<#import "/ccm-cms/content-item.ftl" as ContentItem>
|
||||||
|
|
||||||
<#function getDescription data>
|
<#function getDescription data>
|
||||||
<#if (data["./instituteDesc"]?size > 0)>
|
<#if (data["./instituteDesc"]?size > 0)>
|
||||||
|
|
@ -16,12 +16,12 @@
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
<#function getShortDescription data>
|
<#function getShortDescription data>
|
||||||
<#if (data["./instituteShortDescription"])>
|
<#if (data["./instituteShortDescription"]?size > 0)>
|
||||||
<#return data["./departmentShortDescription"])>
|
<#return data["./departmentShortDescription"]>
|
||||||
<#elseif (data["./shortDescription"])>
|
<#elseif (data["./shortDescription"]?size > 0)>
|
||||||
<#return data["./shortDescription"])>
|
<#return data["./shortDescription"]>
|
||||||
<#elseif (data["./shortDesc"])>
|
<#elseif (data["./shortDesc"]?size > 0)>
|
||||||
<#return data["./shortDesc"])>
|
<#return data["./shortDesc"]>
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue