Documentation for ccm-cms-types-image.ftl
git-svn-id: https://svn.libreccm.org/ccm/trunk@6302 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
142074d7c1
commit
698604870a
|
|
@ -5,6 +5,17 @@
|
||||||
"ui": "http://www.arsdigita.com/ui/1.0"}
|
"ui": "http://www.arsdigita.com/ui/1.0"}
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<#--filedoc
|
||||||
|
Functions for processing image items.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the artist of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `artist` property of the image.
|
||||||
|
-->
|
||||||
<#function getArtist item>
|
<#function getArtist item>
|
||||||
<#if (item["./artist"]?size > 0)>
|
<#if (item["./artist"]?size > 0)>
|
||||||
<#return item["./artist"]>
|
<#return item["./artist"]>
|
||||||
|
|
@ -13,6 +24,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the copyright of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `copyright` property of the image.
|
||||||
|
-->
|
||||||
<#function getCopyright item>
|
<#function getCopyright item>
|
||||||
<#if (item["./copyright"]?size > 0)>
|
<#if (item["./copyright"]?size > 0)>
|
||||||
<#return item["./copyright"]>
|
<#return item["./copyright"]>
|
||||||
|
|
@ -21,6 +39,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the description of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `description` property of the image.
|
||||||
|
-->
|
||||||
<#function getDescription item>
|
<#function getDescription item>
|
||||||
<#if (item["./description"]?size > 0)>
|
<#if (item["./description"]?size > 0)>
|
||||||
<#return item["./description"]>
|
<#return item["./description"]>
|
||||||
|
|
@ -29,6 +54,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the license of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `license` property of the image.
|
||||||
|
-->
|
||||||
<#function getLicense item>
|
<#function getLicense item>
|
||||||
<#if (item["./license"]?size > 0)>
|
<#if (item["./license"]?size > 0)>
|
||||||
<#return item["./license"]>
|
<#return item["./license"]>
|
||||||
|
|
@ -37,6 +69,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the material of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `material` property of the image.
|
||||||
|
-->
|
||||||
<#function getMaterial item>
|
<#function getMaterial item>
|
||||||
<#if (item["./material"]?size > 0)>
|
<#if (item["./material"]?size > 0)>
|
||||||
<#return item["./material"]>
|
<#return item["./material"]>
|
||||||
|
|
@ -45,6 +84,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the publish date of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `publishDate` property of the image.
|
||||||
|
-->
|
||||||
<#function getPublishDate item>
|
<#function getPublishDate item>
|
||||||
<#if (item["./publishDate"]?size > 0)>
|
<#if (item["./publishDate"]?size > 0)>
|
||||||
<#return item["./publishDate"]>
|
<#return item["./publishDate"]>
|
||||||
|
|
@ -53,6 +99,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the width of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `width` property of the image.
|
||||||
|
-->
|
||||||
<#function getWidth item>
|
<#function getWidth item>
|
||||||
<#if (item["./images/width"]?size > 0)>
|
<#if (item["./images/width"]?size > 0)>
|
||||||
<#return item["./image/width"]>
|
<#return item["./image/width"]>
|
||||||
|
|
@ -61,6 +114,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the height of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `height` property of the image.
|
||||||
|
-->
|
||||||
<#function getHeight item>
|
<#function getHeight item>
|
||||||
<#if (item["./images/height"]?size > 0)>
|
<#if (item["./images/height"]?size > 0)>
|
||||||
<#return item["./images/height"]>
|
<#return item["./images/height"]>
|
||||||
|
|
@ -69,10 +129,24 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the main text of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `main text` property of the image.
|
||||||
|
-->
|
||||||
<#function getMainText item>
|
<#function getMainText item>
|
||||||
<#return item["./textAsset/content"]>
|
<#return item["./textAsset/content"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the origin of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `origin` property of the image.
|
||||||
|
-->
|
||||||
<#function getOrigin item>
|
<#function getOrigin item>
|
||||||
<#if (item["./origin"]?size > 0)>
|
<#if (item["./origin"]?size > 0)>
|
||||||
<#return item["./origin"]>
|
<#return item["./origin"]>
|
||||||
|
|
@ -81,6 +155,13 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the original size of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `originalSize` property of the image.
|
||||||
|
-->
|
||||||
<#function getOriginalSize item>
|
<#function getOriginalSize item>
|
||||||
<#if (item["./origSize"]?size > 0)>
|
<#if (item["./origSize"]?size > 0)>
|
||||||
<#return item["./origSize"]>
|
<#return item["./origSize"]>
|
||||||
|
|
@ -89,38 +170,101 @@
|
||||||
</#if>
|
</#if>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the URL of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `url` property of the image.
|
||||||
|
-->
|
||||||
<#function getUrl item>
|
<#function getUrl item>
|
||||||
<#return "${contextPrefix}/cms-service/stream/image/?image_id=${getImageId(item)}">
|
<#return "${contextPrefix}/cms-service/stream/image/?image_id=${getImageId(item)}">
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the caption of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `caption` property of the image.
|
||||||
|
-->
|
||||||
<#function getCaption item>
|
<#function getCaption item>
|
||||||
<#return item["./caption"]>
|
<#return item["./caption"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the ID of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `id` property of the image.
|
||||||
|
-->
|
||||||
<#function getImageId item>
|
<#function getImageId item>
|
||||||
<#return item["./image/id"]>
|
<#return item["./image/id"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the thumbnail id of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `thumbnail/id` property of the image.
|
||||||
|
-->
|
||||||
<#function getThumbnailId item>
|
<#function getThumbnailId item>
|
||||||
<#return item["./thumbnail/id"]>
|
<#return item["./thumbnail/id"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the width of the thumbnail of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The width of the thumbnail of the image.
|
||||||
|
-->
|
||||||
<#function getThumbnailWidth item>
|
<#function getThumbnailWidth item>
|
||||||
<#return item["./thumbnail/width"]>
|
<#return item["./thumbnail/width"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the height of the thumbnail of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The height of the thumbnail of the image.
|
||||||
|
-->
|
||||||
<#function getThumbnailHeight item>
|
<#function getThumbnailHeight item>
|
||||||
<#return item["./thumbnail/height"]>
|
<#return item["./thumbnail/height"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the site of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `site` property of the image.
|
||||||
|
-->
|
||||||
<#function getSite item>
|
<#function getSite item>
|
||||||
<#return item["./site"]>
|
<#return item["./site"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the source of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `source` property of the image.
|
||||||
|
-->
|
||||||
<#function getSource item>
|
<#function getSource item>
|
||||||
<#return item["./source"]>
|
<#return item["./source"]>
|
||||||
</#function>
|
</#function>
|
||||||
|
|
||||||
|
<#--doc
|
||||||
|
Get the technique of the image.
|
||||||
|
|
||||||
|
@param The model of the image item to use.
|
||||||
|
|
||||||
|
@return The value of the `technique` property of the image.
|
||||||
|
-->
|
||||||
<#function getTechnique item>
|
<#function getTechnique item>
|
||||||
<#return item["./technique"]>
|
<#return item["./technique"]>
|
||||||
</#function>
|
</#function>
|
||||||
Loading…
Reference in New Issue