All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

EPiImageGallery Property

The EPiImageGallery property is a custom property that have the following features:

  • Thumbnail view of all the pictures in the gallery in edit mode
  • Click the “i” button to preview the image and add an image description and link
  • Drag and drop adding of images and whole folders from the file action window
  • Drag and drop sorting

This is what the EPiImageGallery Property looks like in edit mode if no image is selected. If clicked the normal file selection dialog box is opened.

This is what the EPiImageGallery Property looks like in edit mode if it contains images. A thumbnail of each image is shown, and the images can be dragged and dropped into the right sequence. On mouse over the “i” button is shown, if clicked it opens a preview window where image description can be added.

If you click the “i” button you will see a bigger preview of the image and you have the possibility to add a description and a link.

How do I start using it?

Simply download the module from EPiCode and install it using EPiServer Deployment Center. (It just copies in a few files, it doesn’t touch your web.config or require a rebuild)

You will now get a new property type called “EPiImageGallery”:

How do I access the property value?

You can access the collection of images directly using the GetImages(CurrentPage) method. (Or you can use the EPiImageGalleryViewer or EPiImageGalleryGrid user controls)

Here is an example:

   //Get the property
    if (!CurrentPage.Property["EPiImageGalleryProperty"].IsNull)
      EPiImageGalleryProperty galleryProperty = 
        CurrentPage.Property["EPiImageGalleryProperty"] as EPiImageGalleryProperty;
      if (galleryProperty != null)
        //Get the images by calling GetImages(CurrentPage)
        EPiImageGalleryImageCollection imageCollection = 

        //Databind the image collection to a repeater 
        repGallery.DataSource = imageCollection;
  <asp:Repeater ID="repGallery" runat="server">
      Image url: 
      <%# (Container.DataItem as EPiImageGalleryImage).ImageURL %><br />
      <%# (Container.DataItem as EPiImageGalleryImage).Description %> 
      Link url: 
      <%# (Container.DataItem as EPiImageGalleryImage).LinkURL%>