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
master
jensp 2019-06-05 18:09:59 +00:00
parent 3e2047dce6
commit 00ce52fd4d
1 changed files with 15 additions and 87 deletions

View File

@ -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<Node>`
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.