Documentation for ccm-cms-types-newsitem.ftl
git-svn-id: https://svn.libreccm.org/ccm/trunk@6295 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
def48dcb3e
commit
974a9f6fc3
|
|
@ -6,14 +6,39 @@
|
||||||
>
|
>
|
||||||
<#import "/ccm-cms-types-article.ftl" as Article>
|
<#import "/ccm-cms-types-article.ftl" as Article>
|
||||||
|
|
||||||
|
<#--filedoc
|
||||||
|
Functions for News items
|
||||||
|
-->
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the lead text of a news item
|
||||||
|
|
||||||
|
@param item The news item to use.
|
||||||
|
|
||||||
|
@return The lead text of the news item.
|
||||||
|
-->
|
||||||
<#function getLead item>
|
<#function getLead item>
|
||||||
<#return Article.getLead(item)>
|
<#return Article.getLead(item)>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the main text of a news item
|
||||||
|
|
||||||
|
@param item The news item to use.
|
||||||
|
|
||||||
|
@return The main of the news item.
|
||||||
|
-->
|
||||||
<#function getMainText item>
|
<#function getMainText item>
|
||||||
<#return Article.getMainText(item)>
|
<#return Article.getMainText(item)>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the date of a news item
|
||||||
|
|
||||||
|
@param item The news item to use.
|
||||||
|
|
||||||
|
@return The date of the news item.
|
||||||
|
-->
|
||||||
<#function getNewsDate item>
|
<#function getNewsDate item>
|
||||||
<#if (item["./newsDate"]?size > 0)>
|
<#if (item["./newsDate"]?size > 0)>
|
||||||
<#return item["./newsDate"] />
|
<#return item["./newsDate"] />
|
||||||
|
|
@ -22,6 +47,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the year of the news date.
|
||||||
|
|
||||||
|
@param item The news item to use.
|
||||||
|
|
||||||
|
@return The year of the news date.
|
||||||
|
-->
|
||||||
<#function getNewsDateYear item>
|
<#function getNewsDateYear item>
|
||||||
<#if (item["./newsDate"]?size > 0)>
|
<#if (item["./newsDate"]?size > 0)>
|
||||||
<#return item["./newsDate/@year"]>
|
<#return item["./newsDate/@year"]>
|
||||||
|
|
@ -30,6 +62,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the month of the news date.
|
||||||
|
|
||||||
|
@param item The news item to use.
|
||||||
|
|
||||||
|
@return The month of the news date.
|
||||||
|
-->
|
||||||
<#function getNewsDateMonth item>
|
<#function getNewsDateMonth item>
|
||||||
<#if (item["./newsDate"]?size > 0)>
|
<#if (item["./newsDate"]?size > 0)>
|
||||||
<#return item["./newsDate/@month"]>
|
<#return item["./newsDate/@month"]>
|
||||||
|
|
@ -38,6 +77,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the day of the news date.
|
||||||
|
|
||||||
|
@param item The news item to use.
|
||||||
|
|
||||||
|
@return The day of the news date.
|
||||||
|
-->
|
||||||
<#function getNewsDateDay item>
|
<#function getNewsDateDay item>
|
||||||
<#if (item["./newsDate"]?size > 0)>
|
<#if (item["./newsDate"]?size > 0)>
|
||||||
<#return item["./newsDate/@day"]>
|
<#return item["./newsDate/@day"]>
|
||||||
|
|
@ -46,6 +92,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the short name of the day of the news date.
|
||||||
|
|
||||||
|
@param item The news item to use.
|
||||||
|
|
||||||
|
@return The short name of the day of the news date.
|
||||||
|
-->
|
||||||
<#function getNewsDateDayNameShort item>
|
<#function getNewsDateDayNameShort item>
|
||||||
<#if (item["./newsDate"]?size > 0)>
|
<#if (item["./newsDate"]?size > 0)>
|
||||||
<#return item["./newsDate/@dayNameShort"]>
|
<#return item["./newsDate/@dayNameShort"]>
|
||||||
|
|
@ -54,6 +107,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the hour of the news date.
|
||||||
|
|
||||||
|
@param item The news item to use.
|
||||||
|
|
||||||
|
@return The hour of the news date.
|
||||||
|
-->
|
||||||
<#function newsDateHour item>
|
<#function newsDateHour item>
|
||||||
<#if (item["./newsDate"]?size > 0)>
|
<#if (item["./newsDate"]?size > 0)>
|
||||||
<#return item["./newsDate/@hour"]>
|
<#return item["./newsDate/@hour"]>
|
||||||
|
|
@ -62,6 +122,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the minute of the news date.
|
||||||
|
|
||||||
|
@param item The news item to use.
|
||||||
|
|
||||||
|
@return The minute of the news date.
|
||||||
|
-->
|
||||||
<#function newsDateMinute item>
|
<#function newsDateMinute item>
|
||||||
<#if (item["./newsDate"]?size > 0)>
|
<#if (item["./newsDate"]?size > 0)>
|
||||||
<#return item["./newsDate/@minute"]>
|
<#return item["./newsDate/@minute"]>
|
||||||
|
|
@ -70,6 +137,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the second of the news date.
|
||||||
|
|
||||||
|
@param item The news item to use.
|
||||||
|
|
||||||
|
@return The second of the news date.
|
||||||
|
-->
|
||||||
<#function newsDateSecond item>
|
<#function newsDateSecond item>
|
||||||
<#if (item["./newsDate"]?size > 0)>
|
<#if (item["./newsDate"]?size > 0)>
|
||||||
<#return item["./newsDate/@second"]>
|
<#return item["./newsDate/@second"]>
|
||||||
|
|
@ -78,6 +152,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Gets the news date in ISO format (`yyyy-mm-dd HH:mm:ss`).
|
||||||
|
|
||||||
|
@param item The news item to use.
|
||||||
|
|
||||||
|
@return The in ISO format.
|
||||||
|
-->
|
||||||
<#function getNewsDateIso item>
|
<#function getNewsDateIso item>
|
||||||
<#if (item["./newsDate"]?size > 0)>
|
<#if (item["./newsDate"]?size > 0)>
|
||||||
<#return item["./newsDate/@iso"]>
|
<#return item["./newsDate/@iso"]>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue