In this lesson, you will learn how to add dynamic galleries and sliders to templates. These galleries and sliders will display content from repeating image fields.
Follow these steps
- Navigate to Toolset→Dashboard and click to create or edit the fields group for the post-type.
- Add to the post-type a custom field of type Image field. Make it a repeating.
- Add sets of images to the different posts (use the repeating image field that you just created).
- Navigate to Toolset→Dashboard and click to Create or edit a Content Template for your post type.
- When editing the Content Template, insert Toolset Gallery or Toolset Image Slider blocks and select a layout.
- Click to use dynamic sources and then select the custom field you created in step 2.
- Style your gallery block or slider block.
Styling the gallery or slider in the template
The gallery and image blocks offer a number of styling options.
- Select the number of columns
- Turn image cropping on and off
- Display or hide captions
- Change the slider output style
- Style the captions (but not edit their text)
Modifying the images that appear in the gallery or slider
Remember that you are adding a gallery or a slider onto a template. If you want to modify the images that different posts show using this template, you need to edit the posts. The template only shows the images that belong to each post.
Edit the individual posts to:
- Select different images
- Reorder the images
- Edit image captions