Docuemntation for the FTL libs provided by ccm-navigation

git-svn-id: https://svn.libreccm.org/ccm/trunk@6285 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2019-11-03 09:24:34 +00:00
parent 77a17736b1
commit ccf8cb9b33
2 changed files with 378 additions and 10 deletions

View File

@ -5,27 +5,54 @@
"ui": "http://www.arsdigita.com/ui/1.0"} "ui": "http://www.arsdigita.com/ui/1.0"}
> >
<#-- <#--filedoc
Functions for processing the data of the components provided by
ccm-navigation.
-->
<#--doc
Get all categories from the category path. Get all categories from the category path.
@return All categories in the current category path.
--> -->
<#function getCategoryPath> <#function getCategoryPath>
<#return model["/bebop:page/nav:categoryPath/nav:category"]> <#return model["/bebop:page/nav:categoryPath/nav:category"]>
</#function> </#function>
<#--doc
Determines if the current page is the root page of a navigation.
@return `true` if teh current page is a root page, `false` otherwise.
-->
<#function isRootPage> <#function isRootPage>
<#return (model["/bebop:page/nav:categoryPath/nav:category"]?size <= 1)> <#return (model["/bebop:page/nav:categoryPath/nav:category"]?size <= 1)>
</#function> </#function>
<#--doc
Gets the currently selected category.
@return The currently selected category.
-->
<#function getSelectedCategory> <#function getSelectedCategory>
<#return model["/bebop:page/nav:categoryPath/nav:category[last()]"]> <#return model["/bebop:page/nav:categoryPath/nav:category[last()]"]>
</#function> </#function>
<#--doc
Gets the ID of the currently selected category.
@return The ID of the currently selected category.
-->
<#function getSelectedCategoryId> <#function getSelectedCategoryId>
<#return model["/bebop:page/nav:categoryPath/nav:category[last()]/@id"]> <#return model["/bebop:page/nav:categoryPath/nav:category[last()]/@id"]>
</#function> </#function>
<#-- <#--doc
Get the title of the provided category. Get the title of the provided category.
@param The model of a category as returned by several functions in this
library.
@return The title of the category.
--> -->
<#function getCategoryTitle category> <#function getCategoryTitle category>
<#return category["./@title"]> <#return category["./@title"]>
@ -33,6 +60,11 @@
<#-- <#--
Get the URL of the provided category. Get the URL of the provided category.
@param The model of a category as returned by several functions in this
library.
@return The URL of the category.
--> -->
<#function getCategoryUrl category> <#function getCategoryUrl category>
<#return category["./@url"]> <#return category["./@url"]>
@ -40,56 +72,103 @@
<#-- <#--
Get the ID get the provided category. Get the ID get the provided category.
@param The model of a category as returned by several functions in this
library.
@return The ID of the provided category.
--> -->
<#function getCategoryId category> <#function getCategoryId category>
<#return category["./@id"]> <#return category["./@id"]>
</#function> </#function>
<#--doc
Determines of the provided category is selected.
@param The model of a category as returned by several functions in this
library.
@return `true` if the category is selected, `false` if not.
-->
<#function isCategorySelected category> <#function isCategorySelected category>
<#return (category["./@isSelected='true'"] == true)> <#return (category["./@isSelected='true'"] == true)>
</#function> </#function>
<#-- <#--doc
Get the URL of the root category of the navigation with the provided id. Get the URL of the root category of the navigation with the provided id.
@param navigationId The ID of the navigation system to use.
@return The URL of the root category of the navigation system with the
provided ID.
--> -->
<#function getNavigationRootUrl navigationId="categoryMenu"> <#function getNavigationRootUrl navigationId="categoryMenu">
<#return model["/bebop:page/nav:categoryMenu[@id='${navigationId}']/nav:category/@url"]> <#return model["/bebop:page/nav:categoryMenu[@id='${navigationId}']/nav:category/@url"]>
</#function> </#function>
<#-- <#--doc
Get title of the navigation with the provided id. Get title of the navigation with the provided id.
@param navigationId The ID of the navigation system to use.
@return The title of the navigation.
--> -->
<#function getNavigationTitle navigationId="categoryMenu"> <#function getNavigationTitle navigationId="categoryMenu">
<#return model["/bebop:page/nav:categoryMenu[@id='${navigationId}']/nav:category/@title"]> <#return model["/bebop:page/nav:categoryMenu[@id='${navigationId}']/nav:category/@title"]>
</#function> </#function>
<#-- <#--doc
Retrieves the first level of categories from the category menu with the provided ID. Retrieves the first level of categories from the category menu with the provided ID.
If no id is provided "categoryMenu" is used. If no id is provided "categoryMenu" is used.
@param menuId The ID of the category menu to use.
@return The first level of categories in the menu.
--> -->
<#function getCategoryMenu menuId="categoryMenu"> <#function getCategoryMenu menuId="categoryMenu">
<#return model["/bebop:page/nav:categoryMenu[@id='${menuId}']/nav:category/nav:category"]> <#return model["/bebop:page/nav:categoryMenu[@id='${menuId}']/nav:category/nav:category"]>
</#function> </#function>
<#-- <#--doc
Retrieves the first level of categories from the category hierachy with the provided ID. Retrieves the first level of categories from the category hierachy with the
If no id is provided 'categoryNav' is used. provided ID. If no id is provided 'categoryNav' is used.
@param hierarchyId The ID of the category hierachy to use.
@return The first level of categories in the hierarchy.
--> -->
<#function getCategoryHierarchy hierarchyId="categoryNav"> <#function getCategoryHierarchy hierarchyId="categoryNav">
<#return model["/bebop:page/nav:categoryHierarchy[@id='${hierarchyId}']/nav:category"]> <#return model["/bebop:page/nav:categoryHierarchy[@id='${hierarchyId}']/nav:category"]>
</#function> </#function>
<#-- <#--doc
Gets the subcategories of the provided category. Gets the subcategories of the provided category.
@param ofCategory The model of the category.
@return The sub categories of the provided category.
--> -->
<#function getSubCategories ofCategory> <#function getSubCategories ofCategory>
<#return ofCategory["./nav:category"]> <#return ofCategory["./nav:category"]>
</#function> </#function>
<#--doc
Gets the subcategories of the category with the provided id.
@param categoryId The ID of the category to use.
@return The sub categories of the category with the provided ID.
-->
<#function getSubCategoriesOfCategoryWithId categoryId> <#function getSubCategoriesOfCategoryWithId categoryId>
<#return model["/bebop:page/nav:categoryMenu//nav:category[@id=${categoryId}]/nav:category"]> <#return model["/bebop:page/nav:categoryMenu//nav:category[@id=${categoryId}]/nav:category"]>
</#function> </#function>
<#--doc
Gets the greeting/index item of the current navigation page. The returned
model can be processed with usual functions for processing content items.
@return The model of the index item.
-->
<#function getGreetingItem> <#function getGreetingItem>
<#return model["/bebop:page/nav:greetingItem/cms:item"]> <#return model["/bebop:page/nav:greetingItem/cms:item"]>
</#function> </#function>

View File

@ -5,6 +5,20 @@
"ui": "http://www.arsdigita.com/ui/1.0"} "ui": "http://www.arsdigita.com/ui/1.0"}
> >
<#--filedoc
Functions for accessing objects lists and their properties.
-->
<#--doc
Retrieve the item (models) of an object list. This function can deal with
several different types of object lists, including `SimpleObjectList`,
`ComplexObjectList` and `CustomziableObjectList`.
@param listId The ID of the object list from the the items are retrieved.
@return The models for the entries in the object list. If no list with
the provided `listId` is found and empty sequence is returned.
-->
<#function getItems listId> <#function getItems listId>
<#if (model["/bebop:page/nav:simpleObjectList[@id='${listId}']/nav:objectList"]?size > 0)> <#if (model["/bebop:page/nav:simpleObjectList[@id='${listId}']/nav:objectList"]?size > 0)>
<#-- <#assign items=model["/bebop:page/nav:simpleObjectList[@id='${listId}']/nav:objectList/nav:item"]> --> <#-- <#assign items=model["/bebop:page/nav:simpleObjectList[@id='${listId}']/nav:objectList/nav:item"]> -->
@ -17,7 +31,7 @@
<#-- <#assign items=model["/bebop:page/nav:simpleObjectList[@id='${listId}']/nav:objectList/nav:item"]> --> <#-- <#assign items=model["/bebop:page/nav:simpleObjectList[@id='${listId}']/nav:objectList/nav:item"]> -->
<#elseif (model["/bebop:page/nav:customizableObjectList[@id='${listId}']/nav:objectList"]?size > 0)> <#elseif (model["/bebop:page/nav:customizableObjectList[@id='${listId}']/nav:objectList"]?size > 0)>
<#-- <pre>Found customizable object list ${listId}</pre> --> <#-- <pre>Found customizable object list ${listId}</pre> -->
<#return model["/bebop:page/nav:simpleObjectList[@id='${listId}']/nav:objectList/nav:item"]> <#return model["/bebop:page/nav:customizableObjectList[@id='${listId}']/nav:objectList/nav:item"]>
<#-- <#assign items=model["/bebop:page/nav:simpleObjectList[@id='${listId}']/nav:objectList/nav:item"]> --> <#-- <#assign items=model["/bebop:page/nav:simpleObjectList[@id='${listId}']/nav:objectList/nav:item"]> -->
<#else> <#else>
<#return []> <#return []>
@ -25,6 +39,14 @@
</#if> </#if>
</#function> </#function>
<#--doc
Gets the number of objects/items in an object list.
@param listId The ID of the object list to use.
@return The number of objects in the list. If no list with the provided
`listId` is found `0` is returned.
-->
<#function getObjectCount listId> <#function getObjectCount listId>
<#if (model["/bebop:page/*[@id='${listId}']/nav:noContent"]?size > 0)> <#if (model["/bebop:page/*[@id='${listId}']/nav:noContent"]?size > 0)>
<#return 0> <#return 0>
@ -37,6 +59,13 @@
</#if> </#if>
</#function> </#function>
<#--doc
Gets the base URL for the paginator of an object list.
@param listId The ID of the object list to use.
@return The base URL for the the paginator.
-->
<#function getPaginatorBaseUrl listId> <#function getPaginatorBaseUrl listId>
<#assign baseUrl = model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@baseURL"]> <#assign baseUrl = model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@baseURL"]>
<#if (baseUrl?contains("?"))> <#if (baseUrl?contains("?"))>
@ -46,14 +75,36 @@
</#if> </#if>
</#function> </#function>
<#--doc
Gets the index of the first item shown on the current page.
@param listId The ID of the object list to use.
@return The index of the first item shown on the current page.
-->
<#function getPaginatorBegin listId> <#function getPaginatorBegin listId>
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@objectBegin"]?number> <#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@objectBegin"]?number>
</#function> </#function>
<#--doc
Gets the index of the last item shown on the curent page.
@param listId The ID of the object list to use.
@return The index of the last item shown on the current page.
-->
<#function getPaginatorEnd listId> <#function getPaginatorEnd listId>
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@objectEnd"]?number> <#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@objectEnd"]?number>
</#function> </#function>
<#--doc
Get the number of pages of an object list.
@param listId The ID of the object list to use.
@return The number of pages of the object list. If no list with the
provided `listId` is found the function will return `0`.
-->
<#function getPageCount listId> <#function getPageCount listId>
<#if (model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageCount"]?size == 1)> <#if (model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageCount"]?size == 1)>
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageCount"]?number> <#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageCount"]?number>
@ -63,38 +114,101 @@
</#function> </#function>
<#--doc
Gets the number of the current page.
@param listId The ID of the object list to use.
@return The number of the page currently shown.
-->
<#function getPageNumber listId> <#function getPageNumber listId>
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageNumber"]?number> <#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageNumber"]?number>
</#function> </#function>
<#--doc
Gets the name of the page URL parameter.
@param listId The ID of the object list to use.
@return The name of the page URL parameter.
-->
<#function getPageParam listId> <#function getPageParam listId>
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageParam"]> <#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageParam"]>
</#function> </#function>
<#--doc
Gets the maximum number of items on a page.
@param listId The ID of the object list to use.
@return The maxium number of items on a page.
-->
<#function getPageSize listId> <#function getPageSize listId>
<#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageSize"]?number> <#return model["/bebop:page/*[@id='${listId}']/nav:objectList/nav:paginator/@pageSize"]?number>
</#function> </#function>
<#--doc
Gets the link to the previous page.
@param listId The ID of the object list to use.
@return The link to the previous page.
-->
<#function getPrevPageLink listId> <#function getPrevPageLink listId>
<#return getPaginatorBaseUrl(itemId) + getPageParam(listId) + "=" + (getPageNumber(listId) - 1)> <#return getPaginatorBaseUrl(itemId) + getPageParam(listId) + "=" + (getPageNumber(listId) - 1)>
</#function> </#function>
<#--doc
Gets the link to the next page.
@param listId The ID of the object list to use.
@return The link to the next page.
-->
<#function getNextPageLink listId> <#function getNextPageLink listId>
<#return getPaginatorBaseUrl(itemId) + getPageParam(listId) + "=" + (getPageNumber(listId) + 1)> <#return getPaginatorBaseUrl(itemId) + getPageParam(listId) + "=" + (getPageNumber(listId) + 1)>
</#function> </#function>
<#--doc
Gets the link to the first page.
@param listId The ID of the object list to use.
@return The link to the first page.
-->
<#function getFirstPageLink listId> <#function getFirstPageLink listId>
<#return getPaginatorBaseUrl(itemId) + getPageParam(listId) + "=1"> <#return getPaginatorBaseUrl(itemId) + getPageParam(listId) + "=1">
</#function> </#function>
<#--doc
Gets the link to the last page.
@param listId The ID of the object list to use.
@return The link to the last page.
-->
<#function getLastPageLink listId> <#function getLastPageLink listId>
<#return getPaginatorBaseUrl(itemId) + getPageParam(listId) + "=" + getPageCount(itemId)> <#return getPaginatorBaseUrl(itemId) + getPageParam(listId) + "=" + getPageCount(itemId)>
</#function> </#function>
<#--doc
Gets the title of an item from an object list.
@param item The model of the list entry for the item.
@return The title of the item.
-->
<#function getItemTitle item> <#function getItemTitle item>
<#return item["./nav:attribute[@name='title']"]> <#return item["./nav:attribute[@name='title']"]>
</#function> </#function>
<#--doc
Gets the link to the detail view of an item in a list.
@param item The model of the list entry for the item.
@return The link to the detail view of the item.
-->
<#function getItemLink item> <#function getItemLink item>
<#if (item["./nav:path"]?size > 0)> <#if (item["./nav:path"]?size > 0)>
<#return item["./nav:path"].@@text> <#return item["./nav:path"].@@text>
@ -103,26 +217,77 @@
</#if> </#if>
</#function> </#function>
<#--doc
Checks if the model of the list entry of an item contains a value for the
`lead` property.
@param item The model of the list entry for the item.
@return `true` if the model provides a value of the `lead` property,
`false` if not.
-->
<#function hasItemLead item> <#function hasItemLead item>
<#return (item["./nav:attribute[@name='lead']"]?size > 0)> <#return (item["./nav:attribute[@name='lead']"]?size > 0)>
</#function> </#function>
<#--doc
Gets the value of the `lead` property of an item.
@param item The model of the list entry for the item.
@return The value of the `lead` property.
-->
<#function getItemLead item> <#function getItemLead item>
<#return item["./nav:attribute[@name='lead']"]> <#return item["./nav:attribute[@name='lead']"]>
</#function> </#function>
<#--doc
A generic function for checking if the model of a list entry for an item
has a specific property.
@param item The model of the list entry for the item.
@param property The name of the property to check for.
@return `true` If the provided model provides an value for the property,
`false` if not.
-->
<#function hasItemProperty item property> <#function hasItemProperty item property>
<#return (item["./nav:attribute[@name='${property}']"]?size > 0)> <#return (item["./nav:attribute[@name='${property}']"]?size > 0)>
</#function> </#function>
<#--doc
A generic function for retrieving the value of an property from the model
for a list entry for an item.
@param item The model of the list entry for the item.
@param property The name of the property to retrieve.
@return The value of the property.
-->
<#function getItemProperty item property> <#function getItemProperty item property>
<#return item["./nav:attribute[@name='${property}']"]> <#return item["./nav:attribute[@name='${property}']"]>
</#function> </#function>
<#--doc
Checks if the provided item has an associated image.
@param item The model of the list entry for the item.
@return `true` if the item has an associated image, `false` if not.
-->
<#function hasImage item> <#function hasImage item>
<#return (item["./nav:attribute[@name='imageAttachments.image.id']"]?size > 0 || item["./imageAttachments"]?size > 0)> <#return (item["./nav:attribute[@name='imageAttachments.image.id']"]?size > 0 || item["./imageAttachments"]?size > 0)>
</#function> </#function>
<#--doc
Get the ID of an associated image.
@param item The model of the list entry for the item.
@return The ID of the associated image.
-->
<#function getImageId item> <#function getImageId item>
<#if (item["./nav:attribute[@name='imageAttachments.image.id']"]?size > 0)> <#if (item["./nav:attribute[@name='imageAttachments.image.id']"]?size > 0)>
<#return item["./nav:attribute[@name='imageAttachments.image.id'][1]"]> <#return item["./nav:attribute[@name='imageAttachments.image.id'][1]"]>
@ -131,10 +296,24 @@
</#if> </#if>
</#function> </#function>
<#--doc
Generates the URL for an associated image.
@param item The model of the list entry for the item.
@return The URL of the associated image.
-->
<#function getImageUrl item> <#function getImageUrl item>
<#return dispatcherPrefix + '/cms-service/stream/image/?image_id=' + getImageId(item)> <#return dispatcherPrefix + '/cms-service/stream/image/?image_id=' + getImageId(item)>
</#function> </#function>
<#--doc
Gets the caption for the associated image.
@param item The model of the list entry for the item.
@return The caption for the associated image.
-->
<#function getImageCaption item> <#function getImageCaption item>
<#if (item["./nav:attribute[@name='imageAttachments.image.id']"]?size > 0)> <#if (item["./nav:attribute[@name='imageAttachments.image.id']"]?size > 0)>
<#return item["./nav:attribute[@name='imageAttachments.image.caption'][1]"].@@text> <#return item["./nav:attribute[@name='imageAttachments.image.caption'][1]"].@@text>
@ -143,6 +322,14 @@
</#if> </#if>
</#function> </#function>
<#--doc
Retrieves the filters for an object list.
@param listId The ID of the list to use.
@return The filters for the list. An empty sequence is returned if no list
with the provided `listId` could be found or if the list does not have any filters.
-->
<#function getFilters listId> <#function getFilters listId>
<#if (model["/bebop:page/nav:simpleObjectList[@id='${listId}']/filterControls"]?size > 0)> <#if (model["/bebop:page/nav:simpleObjectList[@id='${listId}']/filterControls"]?size > 0)>
<#return model["/bebop:page/nav:simpleObjectList[@id='${listId}']//filterControls/filters/filter"]> <#return model["/bebop:page/nav:simpleObjectList[@id='${listId}']//filterControls/filters/filter"]>
@ -155,14 +342,35 @@
</#if> </#if>
</#function> </#function>
<#--doc
Get the label of a filter.
@param filter model of a filter as returned by `getFilters`.
@return The label of the filter.
-->
<#function getFilterLabel filter> <#function getFilterLabel filter>
<#return filter["./@label"]> <#return filter["./@label"]>
</#function> </#function>
<#--doc
Get the type of a filter.
@param filter model of a filter as returned by `getFilters`.
@return The type of the filter.
-->
<#function getFilterType filter> <#function getFilterType filter>
<#return filter["./@type"]> <#return filter["./@type"]>
</#function> </#function>
<#--doc
Get the options of a select filter.
@param filter model of a filter as returned by `getFilters`.
@return The options of the select filter.
-->
<#function getSelectFilterOptions filter> <#function getSelectFilterOptions filter>
<#if (filter["./@type"] == "select")> <#if (filter["./@type"] == "select")>
<#return filter["./option"]> <#return filter["./option"]>
@ -171,14 +379,35 @@
</#if> </#if>
</#function> </#function>
<#--doc
Get the currently selected option of a select filter.
@param filter model of a filter as returned by `getFilters`.
@return The currently selected option.
-->
<#function getSelectFilterSelection filter> <#function getSelectFilterSelection filter>
<#return filter["./selected"]> <#return filter["./selected"]>
</#function> </#function>
<#--doc
The label for an option of a select filter.
@param filter model of an option as returned by `getSelectFilterOptions`.
@return The label of the option.
-->
<#function getSelectFilterOptionLabel option> <#function getSelectFilterOptionLabel option>
<#return option["./label"]> <#return option["./label"]>
</#function> </#function>
<#--doc
Gets the search string of an category filter.
@param filter model of a filter as returned by `getFilters`.
@return The search string.
-->
<#function getCategoryFilterSearchString filter> <#function getCategoryFilterSearchString filter>
<#if filter["./@type"] == "categoryFilter"> <#if filter["./@type"] == "categoryFilter">
<#return filter["./searchString"]> <#return filter["./searchString"]>
@ -187,6 +416,13 @@
</#if> </#if>
</#function> </#function>
<#--doc
Gets the separator for a category filter.
@param filter The model of a filter as returned by `getFilters`.
@return The separator for separating the categories in the search string.
-->
<#function getCategoryFilterSeparator filter> <#function getCategoryFilterSeparator filter>
<#if filter["./@type"] == "categoryFilter"> <#if filter["./@type"] == "categoryFilter">
<#return filter["./separator"]> <#return filter["./separator"]>
@ -195,6 +431,13 @@
</#if> </#if>
</#function> </#function>
<#--doc
Determines if a category allows the selection of multiple categories.
@param filter The model of a filter as returned by `getFilters`.
@return `true` if the filter allows multiple selections, `false` otherwise.
-->
<#function getCategoryFilterMultiple filter> <#function getCategoryFilterMultiple filter>
<#if filter["./@type"] == "categoryFilter"> <#if filter["./@type"] == "categoryFilter">
<#return filter["./multiple"] == "true"> <#return filter["./multiple"] == "true">
@ -203,6 +446,13 @@
</#if> </#if>
</#function> </#function>
<#--doc
Gets the selectable categories for a category filter.
@param filter The model of a filter as returned by `getFilters`.
@return The selectable categories.
-->
<#function getCategoryFilterCategories filter> <#function getCategoryFilterCategories filter>
<#if filter["./@type"] == "categoryFilter"> <#if filter["./@type"] == "categoryFilter">
<#return filter["./categories/categories"]> <#return filter["./categories/categories"]>
@ -211,6 +461,13 @@
</#if> </#if>
</#function> </#function>
<#--doc
Gets the groups of a category filter.
@param filter The model of a filter as returned by `getFilters`.
@return The groups of a category filter.
-->
<#function getCategoryFilterCategoryGroups filter> <#function getCategoryFilterCategoryGroups filter>
<#if filter["./@type"] == "categoryFilter"> <#if filter["./@type"] == "categoryFilter">
<#return filter["./categories/categoryGroup"]> <#return filter["./categories/categoryGroup"]>
@ -219,20 +476,52 @@
</#if> </#if>
</#function> </#function>
<#--doc
Gets the label of a category group.
@param group The model of a category group as returned by
`getCategoryFilterCategoryGroups`.
@return The label for the group.
-->
<#function getCategoryGroupLabel group> <#function getCategoryGroupLabel group>
<#return group["./label"]> <#return group["./label"]>
</#function> </#function>
<#--doc
Gets the categories in a group.
@param group The model of a category group as returned by
`getCategoryFilterCategoryGroups`.
@return The categories in the group.
-->
<#function getCategoryFilterCategoryGroupsCategories groups> <#function getCategoryFilterCategoryGroupsCategories groups>
<#return group["./categories/categoryGroup/category"]> <#return group["./categories/categoryGroup/category"]>
</#function> </#function>
<#--doc
Gets the ID of a category of a category filter.
@param category The model of a category as returned by
`getCategoryFilterCategoryGroupsCategories`.
@return The ID of the category.
-->
<#function getCategoryFilterCategoryId category> <#function getCategoryFilterCategoryId category>
<#return category["./@id"]> <#return category["./@id"]>
</#function> </#function>
<#--doc
Gets the label of a category of a category filter.
@param category The model of a category as returned by
`getCategoryFilterCategoryGroupsCategories`.
@return The label of the category.
-->
<#function getCategoryFilterCategoryLabel category> <#function getCategoryFilterCategoryLabel category>
<#return category.@@text> <#return category.@@text>
</#function> </#function>