From 00ce52fd4d774e2d1bd53d02645e5f40d9b75ddd Mon Sep 17 00:00:00 2001 From: jensp Date: Wed, 5 Jun 2019 18:09:59 +0000 Subject: [PATCH] Documentation for the Freemarker functions provided by ccm-cms-assets-relatedlink git-svn-id: https://svn.libreccm.org/ccm/trunk@6108 8810af33-2d31-482b-a856-94f89814c4df --- .../freemarker/ccm-cms-assets-relatedlink.md | 102 +++--------------- 1 file changed, 15 insertions(+), 87 deletions(-) diff --git a/ccm-cms-assets-relatedlink/doc/freemarker/ccm-cms-assets-relatedlink.md b/ccm-cms-assets-relatedlink/doc/freemarker/ccm-cms-assets-relatedlink.md index 7a8da8fe0..5f5f7094c 100644 --- a/ccm-cms-assets-relatedlink/doc/freemarker/ccm-cms-assets-relatedlink.md +++ b/ccm-cms-assets-relatedlink/doc/freemarker/ccm-cms-assets-relatedlink.md @@ -1,109 +1,37 @@ -### ccm-cms-assets-relatedlink +# Freemarker functions for related links + +Import path +: `/ccm-cms-assets-relatedlinks` Functions for processing the related links assigned to a content item. -#### getRelatedLinks +## `getRelatedLinks(item: Node, linkListName: String = "NONE"): Sequence` - getRelatedLinks(item, linkListName="NONE") +Retrieves the related links assigned to a content item. Related links can be organized in named list. The optional parameters `linkListName` controls which list is used. If the parameter is omitted the default value `NONE` is used. -Retrieves the related links assigned to a content item. - -##### Parameters - -`item` The content item - -`linkListName` The related links of a content item can be organized in -link lists. The default list (if no other is used) is `NONE` which is -the default value of this parameter. Only the links which belong to the -provided group are returned. - -##### Returns - -The related links of the provided `linkListGroup` of the provided content -item. - -#### getLinkType - - getLinkType(link) +## `getLinkType(link: Node): String` Gets the type of the provided link which can either be `externalLink`, `internalLink` or `caption`. -##### Parameters - -`link` The link - -##### Returns - -The type of the provided link. - -#### getLinkTitle - - getLinkTitle(link) +## `getLinkTitle(link: Node): String` Gets the title of the provided link. -##### Parameters - -`link` The link. - -##### Returns - -The title of the provided link. - -#### getLinkDescription - - getLinkDescription(link) +## `getLinkDescription(link: Node): String` Gets the description of the provided link. -##### Parameters +## `getLinkOrder(link: Node): String` -`link` The link. +Gets the order value for the provided link. -##### Returns +## `getInternalLinkParameters(link: Node): String` -The description of the provided link. +Gets the URL parameters of the of the provided link (The part after +the question mark). -#### getLinkOrder - - getLinkOrder(link) - -Gets the order value of the provided link. - -##### Parameters - -`link` The link. - -##### Returns - -The order value of the provided link. - -#### getInternalLinkParameters - - getLinkInternalLinkParameters(link) - -Gets the parameters of the of the provided link. - -##### Parameters - -`link` The link. - -##### Returns - -The parameters to add to the URL of the provided link. - -#### getTargetUri - - getTargetUri(link) +## `getTargetUri(link: Node`): String Gets the URI of the target of the provided link. -##### Parameters - -`link` The link. - -##### Returns - -The URI of the target of the provided link. -