CMS: Connect Gallery
4 min
Connect this gallery to the CMS to display content from your CMS collection. After connecting to a dataset that binds to your collection, choose which fields connect to each part of your gallery.
What are the CMS connection options for this gallery?
The connection options allow you to specify how different parts of the gallery link to specific fields in the collection.
Connect the following options to collection fields:
- Image sources connect to: The images you want to display in the gallery.
- Titles connect to: The fields used for each item's title in the gallery.
- Descriptions connect to: The fields used for each item's description in the gallery.
- Alt texts connect to: The fields used for each item's alt text in the gallery.
- Links connect to: The fields or dynamic pages you want to link each item to.
Learn more about connecting CMS collection items to galleries.
Can I show numerous images and videos on a dynamic item page?
Yes. If you have several media files for each item in your CMS collection, you can display them in a gallery on your dynamic item page.
First, upload the media files for each item to a media gallery field type in your collection. Then connect a gallery on your dynamic item page to a dataset that links to your connection. Connect your image sources connect to option to the media gallery field and publish your site to make the changes go live.
Learn more about connecting galleries to the media gallery field in CMS collections.
Can I add 'Next' and 'Previous' buttons to cycle through items?
Yes, you can create 'Next' and 'Previous' buttons or images visitors can click to see other collection items.
To create 'Next' and 'Previous' buttons:
- On static pages: Set the dataset's Click action connects to field to Next item or Previous item. When visitors click the buttons, the dataset's connected elements change to reflect the next or previous item retrieved by the dataset.
- On dynamic list pages: Set the Click action connects to field to Next page or Previous page. When visitors click the buttons, the next or previous 'page' of items loads in the connected gallery. The Items per load field determines the maximum items per 'page'.
- On dynamic item pages: Set the Click action connects to field to Next dynamic page or Previous dynamic page. When visitors click the buttons, they navigate to the next or previous item's version of the page at the item's dedicated dynamic URL.
Learn more about the various click actions you can set for buttons and images.
How do I create a 'Load More' button?
'Load More' buttons allow visitors to click to load more items in galleries connected to datasets. The total maximum items that can load at a time is determined by the Items per load field in the dataset settings. You can set this field to show up to 1,000 items at a time.
To create a 'Load More' button, add a button or image, connect it to the dataset and set the element's click action to Load more.
Learn how to add a 'Load More' button to a gallery on a dynamic list page.
Note: If you connect a gallery to your collection's 'Media Gallery' field type, you can use the gallery's built-in 'Load More' button to restrict the number of images or videos displayed on the page.
What is a dataset?
Datasets are the vital link between the elements on your page and the content in your CMS collection. You can use datasets to create a two-way connection, allowing you to display collection content, capture user inputs, or both.
Datasets allow you to control which parts of your page elements connect to which fields in your collection. Each dataset connects to a collection and each element connected to the dataset connects to a field in the collection. This unlocks a new way of managing which content appears and where.
Learn more about adding and setting up a dataset.
How do I add sorts, filters, and more options to my dataset?
You can modify your dataset from the dataset settings:
- In your Editor, select the relevant dataset and click Settings.
Note: In the Studio Editor, go to the Inspector panel to select the dataset. Then click the More Actions iconnext to the relevant dataset and select Dataset settings.
- Click the Choose a collection drop-down and select the collection you want to connect.
- Click the Dataset name field to change the dataset name.
- Click the Dataset mode drop-down to change the dataset mode.
- Edit the Items per load field to set the maximum items that can load at a time. This is also the maximum items that load when visitors click 'Load More' buttons on repeaters and galleries or 'Next/Previous page' buttons on dynamic item pages.
- Click + Add Filter to show or hide specific content from your collection.
- Click + Add Sort to choose the order in which collection items display.
Learn more about:
Did this help?
|
Didn’t find what you’re looking for? Try one of these articles.
Didn’t find what you’re looking for? Try one of these articles.
