Dynamic galleries

This feature is unavailable for AMPHTML ads.

You can use groups to display multiple dynamic elements within each frame of a Swipeable Gallery or Carousel Gallery. For example, you might want each frame to include both the product image and text description for an item.

Create a group with all the elements you want to display in a gallery frame, then add that group to the gallery. With the right data binding, the gallery will populate each frame with the data for each item in your dynamic feed or profile.

If you use a Display & Video 360 custom schema, the data schema object names will depend on the field names you set up for the Studio dynamic profile.

Create dynamic elements within a gallery

  1. Create placeholders for the elements that you want to be dynamic. For example, create an image element and a product description text container.
  2. Select the placeholder elements and create a group.
  3. Delete the group from the stage. The group will still appear in the Library.
  4. Set the Groups property for the gallery to the name of the group you created.
  5. Add a binding for each dynamic element in the group. Open the Dynamic Properties dialog by clicking the + button on the Dynamic panel and configure the binding:
    1. For Element, select the element in the group that you want to bind the feed data to. In this example, the description text container is called Group1 div #description-txt.
    2. For Element attribute, select the attribute that should be defined by dynamic data. In this example, select Text content.
    3. For Data schema object, select the feed attribute or dynamic profile field to bind to, using the first item (which is numbered 0). In this example, select Product > 0 > description, which displays in the dialog as Product.0.description.
    4. Add another binding and repeat the steps above for each dynamic element in your group. In this example, add a binding for the product image.
  6. Create a binding between the group and the top-level item:
    1. For Element, select the group with your gallery frame elements.
    2. For Element attribute, select Repeat for each item in collection.
    3. For Data schema object, select the top-level item. In this example, select Product.
  7. Click OK.

Your gallery will iterate through all the items in your dynamic feed or profile, displaying one per frame.

Add dynamic exit URLs

If your dynamic data includes an exit URL for each item, you can set up your gallery to use the exit URL for the currently displaying item.

  1. Open the Dynamic panel and click + to add a new binding.
  2. If you don't know which data schema you're using, click the Data Schema tab.
    • If the data schema type is set to Custom Schema, you're using a custom schema.
    • Otherwise, you're using a standard schema.
    • Go back to Bindings tab to continue adding the new binding.
  3. For the Element, select your gallery.
  4. For the Element attribute, select Exit URLs.
  5. The Data schema object depends on which schema you're using.
    • ​For a standard schema, enter the following:
      Product | pluckandjoin url
    • For a custom schema:
      1. Select the top-level item. The name may vary, but it will be the first item in the list.
      2. Click the Filter tab, then apply the pluckandjoin KEY filter.
      3. Edit KEY to the data schema object for the exit URL. The name is case-sensitive, so you may want to select a test item and copy the relevant part. For example, you might select myFeed.0.myExit.Url as the URL for the first item, then copy myExit.Url as the part that specifies the exit URL.

        The final data schema object will look similar to this:
        myFeed | pluckandjoin myExit.Url
Was this article helpful?
How can we improve it?