Photo Carrousel - Documentation topics on: deprecated,macros,photo carrousel,.

Photo Carrousel
Deprecated

** This macro has been deprecated **

The Photo Carrousel "macro" pulls generates a carrousel of photos, displaying sequentially one after another.

Macro Overview:

Syntax:

#photoCarrousel (photoList photoDimensions)

Arguments:

  • imageFolder
    This is the path where the images to be displayed are stored.
  • photoList
    This is the list of photos to be displayed on a carrousel. Every element of this list specifies the image url and the link where the image will redirect when it's clicked. This is only a required parameter if the imageFolder hasn't been defined.
  • photoDimensions
    This is a list that specifies the width and height of the image to be displayed.

Optional Parameters:

  • photoCarrouselAutoSlide
    Set to true if you want an automatic sequential display of the photos, otherwise set to false.
  • imageFolder
    The URI of the folder that has the images.
  • photoCarrouselSourceCode
    The URI with the page that will display the images.
  • showCaptions
    This variable determine if the macro will display the images' caption. Default value true

Usage:
The macro will display a carrousel of photos that front end users can click through

Examples:

Example 1: This show a simple way to call the macro setting the image folder

#set($imageFolder = '/global/images/screencaps/')

#set($photoDimensions = $contents.getEmptyMap())
#set($dummy = $!photoDimensions.put("width", "125"))
#set($dummy = $!photoDimensions.put("height", "125"))
#set($photoCarrouselAutoSlide = true)

#set($photoList = $contents.getEmptyList())
#photoCarrousel($photoList $photoDimensions)

Example 2: This show a simple way to call the macro with the photo list fields

#set($photoList = $contents.getEmptyList())

#set($photo = $contents.getEmptyMap())
#set($dummy = $!photo.put("url", "/html/1.jpg"))
#set($dummy = $!photo.put("link", "http://www.yahoo.com"))
#set($dummy = $!photoList.add($photo))

#set($photo = $contents.getEmptyMap())
#set($dummy = $!photo.put("url", "/html/2.jpg"))
#set($dummy = $!photo.put("link", "http://www.google.com"))
#set($dummy = $!photoList.add($photo))

#set($photo = $contents.getEmptyMap())
#set($dummy = $!photo.put("url", "/html/3.jpg"))
#set($dummy = $!photo.put("link", "http://www.dotcms.org"))
#set($dummy = $!photoList.add($photo))

#set($photo = $contents.getEmptyMap())
#set($dummy = $!photo.put("url", "/html/4.jpg"))
#set($dummy = $!photo.put("link", "http://www.hotmail.com"))
#set($dummy = $!photoList.add($photo))

#set($photoDimensions = $contents.getEmptyMap())
#set($dummy = $!photoDimensions.put("width", "125"))
#set($dummy = $!photoDimensions.put("height", "125"))

#set($photoCarrouselAutoSlide = true)

#photoCarrousel($photoList $photoDimensions)

Example 3: This show a simple way to call the macro with the photo list fields and showing captions:

#set($photoList = $contents.getEmptyList())

#set($photo = $contents.getEmptyMap())
#set($dummy = $!photo.put("url", "/html/1.jpg"))
#set($dummy = $!photo.put("link", "http://www.yahoo.com"))
#set($dummy = $!photo.put("caption", "Yahoo"))
#set($dummy = $!photoList.add($photo))

#set($photo = $contents.getEmptyMap())
#set($dummy = $!photo.put("url", "/html/2.jpg"))
#set($dummy = $!photo.put("link", "http://www.google.com"))
#set($dummy = $!photo.put("caption", "Google"))
#set($dummy = $!photoList.add($photo))

#set($photo = $contents.getEmptyMap())
#set($dummy = $!photo.put("url", "/html/3.jpg"))
#set($dummy = $!photo.put("link", "http://www.dotcms.org"))
#set($dummy = $!photo.put("caption", "dotCMS"))
#set($dummy = $!photoList.add($photo))

#set($photo = $contents.getEmptyMap())
#set($dummy = $!photo.put("url", "/html/4.jpg"))
#set($dummy = $!photo.put("link", "http://www.hotmail.com"))
#set($dummy = $!photo.put("caption", "HotMail"))
#set($dummy = $!photoList.add($photo))

#set($photoDimensions = $contents.getEmptyMap())
#set($dummy = $!photoDimensions.put("width", "125"))
#set($dummy = $!photoDimensions.put("height", "125"))

#set($photoCarrouselAutoSlide = true)

#photoCarrousel($photoList $photoDimensions)