Skip Navigation

[Resolved] Image Slider Field Source with content templates not assiged to post type

This thread is resolved. Here is a description of the problem and solution.

Problem: I am trying to place a slider gallery block inside a Content Template and use a custom field as the dynamic source, but I cannot select the custom field because the field group is not an option in the dynamic sources panel. The Content Template where I want to place the gallery is not assigned to the post type containing the custom field with images, it is placed in a View, which is also nested inside another Content Template.

Solution: Temporarily assign the Content Template containing the gallery block to a post containing the custom field with images. Then choose the correct custom field in dynamic sources, and verify the field is displayed correctly on the front-end of the site. Once you have finished designing the gallery, unassign the Content Template from the post.

This support ticket is created 3 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by nicoleR-3 3 years ago.

Assisted by: Christian Cox.

Author
Posts
#2009939

Tell us what you are trying to do?
I have an alternating layout for a listing page in which I've created two content templates where the information alternates between left/right. That's all working fine. But I want to add a Toolset slider gallery into each template, but since they can not be assigned to a post type (due to being part of a larger view) I am not able to select the applicable item in the field group in the block editor. I can only seem to choose the field source for a specific post using "Other Post" but then it repeats the same thing in every instance that uses that content template. Is there a workaround for this or code I can enter instead?

Is there any documentation that you are following?
I followed this prior support ticket to create the alternating layout, but I wasn't using block editor and was using a third party plugin for the photo gallery, so it's not really the same: https://toolset.com/forums/topic/alternating-layout/

Is there a similar example that we can see?
I do not have an example where I have tried to do this in the past.

What is the link to your site?
Relevent page is here: hidden link

#2009975

Hello, I would try a temporary workaround in this case. Let's say you want to display the dynamic slider gallery in Content Template A, which is nested inside a View.
- Edit one of the posts that contains the custom field you want to display in a slider gallery block, and ensure the custom field has some appropriate content.
- Temporarily assign Content Template A to this post, and save the post.
- Edit Content Template A and use the "View with" menu at the top of the screen to select the post you just edited.
- Select the slider gallery block and choose the correct field from the current post in its dynamic sources menu.
- Save the Content Template.
- Edit the post again and reset the Content Template assignment to its previous state.

Test the View on the front-end of the site to confirm the slider gallery is working as expected for different posts. Let me know if this does not solve the problem, and I can take a closer look.

#2010119

That worked. Thanks so much!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.