This page last changed on Dec 12, 2007 by smaddox.

The gallery macro creates a gallery of thumbnails from all the images that are attached to a page and displays them in a tabular format. When a user clicks a thumbnail, the full-size image opens in a new window. The user can also view the images as a slideshow by clicking the 'view as slideshow' link located below the title.

  • The images shown in the gallery are taken from the files attached to the Confluence page.
  • The comments below the images are drawn from the comments on the attachments.
  • The gallery will include all the images attached to the page.
  • Only the following file formats are supported: gif, png, jpeg. The bmp format is not supported.
  • You can sort your images into a particular order - see details below.
  • You can specify a title for the gallery and also configure how many columns you want for the table in which your images are displayed. The default number of columns in the table is 4.

Using the gallery macro

Include the following markup in your page. (Replace the title with your own.)

What you need to type
{gallery:title=Some office photos, and a waterfall}
What you will get

Some office photos, and a waterfall
(view as slideshow)
         
  Here is the waterfall photo      
 
         
    Here's an office photo    
 

Optional parameters

Parameter Default Description
title Nothing Specify a title for your gallery.
columns 4 Specify the number of columns for your table.
slideshow true Set to 'false' to hide the 'view as slide show' link.
sort None i.e. the sort order is unspecified and therefore unpredictable. Specify an attribute to sort the images by that attribute. Sort order is ascending, unless you specify the 'reverseSort' parameter (see below). Options are:
  • 'name' – file name.
  • 'comment' – comment linked to the attached file.
  • 'date' – date/time last modified.
reverseSort Nothing, i.e. sort order is ascending Used in conjunction with 'sort' parameter above. Use 'reverseSort' to reverse the sort order, from ascending to descending.

Examples of optional parameters

Specifying the number of columns for your table

{gallery:columns=3|title=Some office photos, and a waterfall}

Disabling the slide show option

By default, Confluence displays the link to view the images as a slideshow. To disable this link, include the following code within the macro:

{gallery:slideshow=false|title=Some office photos, and a waterfall}

Sorting the images by file name

{gallery:title=Some office photos, and a waterfall|sort=name}

Sorting the images to show most-recently-modified first

{gallery:title=Some office photos, and a waterfall|sort=date|reverseSort}

For a dynamic slideshow, you might like to try the Slideshow Plugin.

RELATED TOPICS

Displaying an Image
Thumbnail Macro
Attaching Files to a Page
Editing Attachment Details
Working with Macros

Take me back to Confluence User Guide


harbour2.jpg (image/jpeg)
harbour3.jpg (image/jpeg)
office10.jpg (image/jpeg)
office11.jpg (image/jpeg)
office3.jpg (image/jpeg)
office1.jpg (image/jpeg)
office2.jpg (image/jpeg)
waterfall.jpg (image/jpeg)
Document generated by Confluence on Dec 20, 2007 19:04