From 7044babdd23ddf79bf1cfd4e93268f339c6e9d27 Mon Sep 17 00:00:00 2001 From: jensp Date: Sun, 3 Nov 2019 10:45:59 +0000 Subject: [PATCH] Documentation for ccm-cms-types-article.ftl git-svn-id: https://svn.libreccm.org/ccm/trunk@6293 8810af33-2d31-482b-a856-94f89814c4df --- .../freemarker/ccm-cms-types-article.ftl | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/ccm-cms-types-article/web/themes/freemarker/ccm-cms-types-article.ftl b/ccm-cms-types-article/web/themes/freemarker/ccm-cms-types-article.ftl index 538b3ecdd..7cab91a33 100644 --- a/ccm-cms-types-article/web/themes/freemarker/ccm-cms-types-article.ftl +++ b/ccm-cms-types-article/web/themes/freemarker/ccm-cms-types-article.ftl @@ -5,8 +5,16 @@ "ui": "http://www.arsdigita.com/ui/1.0"} > -<#-- +<#--filedoc + Functions for processing article items. +--> + +<#--doc Gets the lead text of the provided article. + + @param item The article item to use. + + @return The lead text of the article. --> <#function getLead item> <#if (item["./lead"]?size > 0)> @@ -16,15 +24,23 @@ -<#-- +<#--doc Checks if the provided item has a lead property. + + @param item The article item to use. + + @return `true` If the provided article has a lead text, `false` otherwise. --> <#function hasLead item> <#return (item["./lead"]?size > 0 || item["./nav:attribute[@name='lead']"]?size > 0)> -<#-- +<#--doc Gets the main text the the provided article. + + @param item The article item to use. + + @return The main text of the article. --> <#function getMainText item> <#if (item["./textAsset"]?size > 0)>