Preliminary migration of various FTL function libs for
assets/attachments.
parent
a6569fb35c
commit
4aca200ec9
|
|
@ -0,0 +1,20 @@
|
||||||
|
<#--filedoc
|
||||||
|
Provides functions for processing the image attachemnts of a content item.
|
||||||
|
|
||||||
|
@depcrecated Use ccm-cms/image-attachments.ftl instead
|
||||||
|
-->
|
||||||
|
|
||||||
|
<#import "/ccm-cms/image-attachments.ftl" as ImageAttachments>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Creates a sorted sequence of hashes (see Freemarker docuementation) for the
|
||||||
|
image attachments of a content item.
|
||||||
|
|
||||||
|
@param item The model of the content item to use.
|
||||||
|
|
||||||
|
@return The images attached to the item.
|
||||||
|
-->
|
||||||
|
<#function getImageAttachments item>
|
||||||
|
<#return ImageAttachments.getImageAttachments(item)>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
<#--filedoc
|
||||||
|
Functions for processing note attachments.
|
||||||
|
|
||||||
|
@depcrecated Use ccm-cms/sidenote-attachments instead
|
||||||
|
-->
|
||||||
|
|
||||||
|
<#import "/ccm-cms/sidenote-attachments" as SideNotes>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Generates a sorted sequence of hashes (see Freemarker documentation) for
|
||||||
|
the note attachments of a content item.
|
||||||
|
|
||||||
|
@param item The model of the content item to use.
|
||||||
|
|
||||||
|
@return The side notes attached to the item.
|
||||||
|
-->
|
||||||
|
<#function getNotes item>
|
||||||
|
<#return item.sideNotes>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
<#--filedoc
|
||||||
|
Functions for processing related links.
|
||||||
|
|
||||||
|
@depcrecated Use ccm-cms/relatedlink-attachments.ftl instead
|
||||||
|
-->
|
||||||
|
|
||||||
|
<#import "/ccm-cms/relatedlink-attachments.ftl" as RelatedLinks>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Generates a sorted sequence of hashes (see Freemarker documentation)
|
||||||
|
from the related links of a content item.
|
||||||
|
|
||||||
|
@param item The model of the content item to use.
|
||||||
|
|
||||||
|
@param linkListName: The name of the link list to use.
|
||||||
|
|
||||||
|
@return The links attached to the provided item.
|
||||||
|
-->
|
||||||
|
<#function getRelatedLinks item linkListName="NONE">
|
||||||
|
|
||||||
|
<#return RelatedLinks.getRelatedLinks(item linkListName)>
|
||||||
|
|
||||||
|
<#-- <#return item["./links[./linkListName='${linkListName}']"]?sort_by("linkOrder")> -->
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
*Internal* function for determing the type a related link.
|
||||||
|
|
||||||
|
@param link The link
|
||||||
|
|
||||||
|
@return The type of the link. Either `externalLink`, `internalLink` or `caption`.
|
||||||
|
-->
|
||||||
|
<#function _getLinkType link>
|
||||||
|
<#return RelatedLinks.:_getLinkType(link)>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
*Internal* function for getting parameters for the link.
|
||||||
|
|
||||||
|
@param link The link
|
||||||
|
|
||||||
|
@return Parameters for an internal link.
|
||||||
|
-->
|
||||||
|
<#function _getInternalLinkParameters link>
|
||||||
|
<#return RelatedLinks._getInternalLinkParameters(link)>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
*Internal* function for constructing the target URI of a related link.
|
||||||
|
|
||||||
|
@param link The link model to use.
|
||||||
|
|
||||||
|
@return The URL for the target of the link.
|
||||||
|
-->
|
||||||
|
<#function _getTargetUri link>
|
||||||
|
<#return RelatedLinks._getTargetUri(link)>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
<#--filedoc
|
||||||
|
Provides functions for processing the image attachemnts of a content item.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Creates a sorted sequence of hashes (see Freemarker docuementation) for the
|
||||||
|
image attachments of a content item.
|
||||||
|
|
||||||
|
@param item The model of the content item to use.
|
||||||
|
|
||||||
|
@return The images attached to the provided item.
|
||||||
|
-->
|
||||||
|
<#function getImageAttachments item>
|
||||||
|
<#return item.imageAttachments>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
<#--filedoc
|
||||||
|
Functions for processing related links.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Generates a sorted sequence of hashes (see Freemarker documentation)
|
||||||
|
from the related links of a content item.
|
||||||
|
|
||||||
|
@param item The model of the content item to use.
|
||||||
|
|
||||||
|
@param linkListName: The name of the link list to use.
|
||||||
|
|
||||||
|
@return The links attached to the provided item.
|
||||||
|
-->
|
||||||
|
<#function getRelatedLinks item linkListName="NONE">
|
||||||
|
|
||||||
|
<#return item.relatedLinks[linkListName]>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
*Internal* function for determing the type a related link.
|
||||||
|
|
||||||
|
@param link The link
|
||||||
|
|
||||||
|
@return The type of the link..
|
||||||
|
-->
|
||||||
|
<#function _getLinkType link>
|
||||||
|
<#return link.type>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
*Internal* function for getting parameters for the link.
|
||||||
|
|
||||||
|
@param link The link
|
||||||
|
|
||||||
|
@return Parameters for an internal link.
|
||||||
|
-->
|
||||||
|
<#function _getInternalLinkParameters link>
|
||||||
|
<#return link.parameters>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
*Internal* function for constructing the target URI of a related link.
|
||||||
|
|
||||||
|
@param link The link model to use.
|
||||||
|
|
||||||
|
@return The URL for the target of the link.
|
||||||
|
-->
|
||||||
|
<#function _getTargetUri link>
|
||||||
|
<#return link.targetUri>
|
||||||
|
</#function>
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
<#--filedoc
|
||||||
|
Functions for processing note attachments.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Generates a sorted sequence of hashes (see Freemarker documentation) for
|
||||||
|
the note attachments of a content item.
|
||||||
|
|
||||||
|
@param item The model of the content item to use.
|
||||||
|
|
||||||
|
@return The side notes attached to the item.
|
||||||
|
-->
|
||||||
|
<#function getNotes item>
|
||||||
|
<#returm item.sideNotes>
|
||||||
|
</#function>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
*.tmp.txt
|
||||||
Loading…
Reference in New Issue