james_scee
11 years agoAce
How do you call FreeMarker macros on a page?
[Mod Note: This was originally posted as a comment to this TKB article: Creating FreeMarker macros for custom components and endpoints]
How do you call them on the page, as I'm trying as via the freemarker code, but to no avail.
macro:
<#macro m_singular num words>
<#if (num == 1)>
<#return words.singular>
</#if>
<#return words.plural>
</#macro>
attempting to call:
<@m_singular num=count.value words={"singular":"post","plural":"posts"} />