Freemarker functions for News and Events

-- line, and those below, will be ignored--

M    ccm-cms-types-event/web/themes/freemarker/ccm-cms-types-event.ftl
M    ccm-cms-types-newsitem/web/themes/freemarker/ccm-cms-types-newsitem.ftl


git-svn-id: https://svn.libreccm.org/ccm/trunk@5898 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2019-04-02 11:30:43 +00:00
parent b84eb95fa7
commit d08fddb17d
2 changed files with 39 additions and 1 deletions

View File

@ -5,6 +5,8 @@
"ui": "http://www.arsdigita.com/ui/1.0"}
>
<#import "/ccm-cms-types-article/macros.ftl" as Article>
<#--
Outputs the lead text of the provided event.
-->
@ -153,6 +155,15 @@
</#if>
</#macro>
<#function getLead item>
<#return Article.getLead(item)>
</#function>
<#function getMainText item>
<#return Article.getMainText(item)>
</#function>
<#function getEndDate item>
<#if (item["./endDate"]?size > 0)>
<#return item["./endDate"]>
@ -287,31 +298,49 @@
</#if>
</#macro>
<#function getLocation(item)>
<#return item["./location"]>
</#function>
<#macro mainContributor item>
<#if (item["./mainContributor"]?size > 0)>
${item["./mainContributor"]}
</#if>
</#macro>
<#function getMainContributor item>
<#return item["./mainContributor"]>
</#function>
<#macro eventType item>
<#if (item["./eventType"]?size > 0)>
${item["./eventType"]}
</#if>
</#macro>
<#function getEventType item>
<#return item["./eventType"]>
</#function>
<#macro cost item>
<#if (item["./cost"]?size > 0)>
${item["./cost"]}
</#if>
</#macro>
<#function getCost item>
<#return item["./cost"]>
</#function>
<#macro mapLink item>
<#if (item["./mapLink"]?size > 0)>
<#nested item["./mapLink"]>
</#if>
</#macro>
<#function getMapLink>
<#return item["./mapLink"]>
</#function>

View File

@ -4,6 +4,7 @@
"nav":"http://ccm.redhat.com/navigation",
"ui": "http://www.arsdigita.com/ui/1.0"}
>
<#import "/ccm-cms-types-article/macros.ftl" as Article>
<#--
Outputs the lead text of the provided news item.
@ -16,6 +17,14 @@
</#if>
</#macro>
<#function getLead item>
<#return Article.getLead(item)>
</#function>
<#function getMainText item>
<#return Article.getMainText(item)>
</#function>
<#--
Output the main text of the provided news item.
-->