Documentation for the FTL libs provided by ccm-themedirectory

git-svn-id: https://svn.libreccm.org/ccm/trunk@6287 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2019-11-03 09:30:09 +00:00
parent 3e3d380bac
commit 511180c0da
2 changed files with 19 additions and 6 deletions

View File

@ -5,7 +5,7 @@
"ui": "http://www.arsdigita.com/ui/1.0"} "ui": "http://www.arsdigita.com/ui/1.0"}
> >
<#--- <#--doc
Retrieves the languages in which the content of the current page is Retrieves the languages in which the content of the current page is
available. available.

View File

@ -5,7 +5,7 @@
"ui": "http://www.arsdigita.com/ui/1.0"} "ui": "http://www.arsdigita.com/ui/1.0"}
> >
<#--- <#--doc
Gets the application of the page served from the model. Gets the application of the page served from the model.
@return The current application. @return The current application.
@ -14,7 +14,7 @@
<#return model["/bebop:page/@application"]> <#return model["/bebop:page/@application"]>
</#function> </#function>
<#--- <#--doc
Get the title of the current page. Get the title of the current page.
This will only work of the current page is a navigation page with a category This will only work of the current page is a navigation page with a category
@ -26,15 +26,19 @@
<#return model["//nav:categoryMenu/nav:category/@title"]> <#return model["//nav:categoryMenu/nav:category/@title"]>
</#function> </#function>
<#--- <#--doc
Get the hostname from the sitebanner data. Get the hostname from the sitebanner data.
@return The host name of the site.
--> -->
<#function getSiteHostName> <#function getSiteHostName>
<#return model["/bebop:page/ui:siteBanner/@hostname"]> <#return model["/bebop:page/ui:siteBanner/@hostname"]>
</#function> </#function>
<#--- <#--doc
Get the name of the site from the sitebanner data. Get the name of the site from the sitebanner data.
@return The name of the site.
--> -->
<#function getSiteName> <#function getSiteName>
<#return model["/bebop:page/ui:siteBanner/@sitename"]> <#return model["/bebop:page/ui:siteBanner/@sitename"]>
@ -44,6 +48,12 @@
Internal function. Not for public use. Internal function. Not for public use.
Internal function for coverting several string values like `yes`, `true`, Internal function for coverting several string values like `yes`, `true`,
`no` etc. to a boolean value. `no` etc. to a boolean value.
@param fromNode An XML node
@param The attribute to convert to boolean.
@return A boolean representation of the value of the attribute.
--> -->
<#function getBooleanAttrValue fromNode attrName> <#function getBooleanAttrValue fromNode attrName>
<#assign path='@' + attrName> <#assign path='@' + attrName>
@ -55,7 +65,7 @@
</#if> </#if>
</#function> </#function>
<#--- <#--doc
A wrapper for the `_formatDateTime` function which adds missing numbers. A wrapper for the `_formatDateTime` function which adds missing numbers.
`_formatDateTime` uses Java APIs for formatting which don't work well with `_formatDateTime` uses Java APIs for formatting which don't work well with
incomplete dates. This function takes a date from the data model and checks incomplete dates. This function takes a date from the data model and checks
@ -64,7 +74,10 @@
component. component.
@param style The date format style from the theme manifest to use. @param style The date format style from the theme manifest to use.
@param date the date to format. @param date the date to format.
@return The formatted date.
--> -->
<#function formatDateTime style date> <#function formatDateTime style date>
<#assign year = (date["./@year"]?size > 0)?then(date["./@year"]?number, 0)> <#assign year = (date["./@year"]?size > 0)?then(date["./@year"]?number, 0)>