Skip Navigation

[Resolved] Can layout plugin auto-fetch data from the posts fields like the custom template

This support ticket is created 6 years, 2 months 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 4 replies, has 2 voices.

Last updated by Himanshu Agarwal 6 years, 2 months ago.

Assisted by: Nigel.

Author
Posts
#914221

am using default genesis framework theme without any custom codings.

I am not saying that the layout plugin is not working at all.

1. Can layout plugin auto-fetch data from the posts fields like the custom template do? Yes or No?

2. If yes, then, I have custom repeatable image field, how can I fetch these image in layout image slider?

#914668

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi there

With Toolset you can make templates for your custom posts to display your custom fields either using Views Content Templates (at Tooslet > Content Templates) or using Template Layouts (at Toolset > Layouts).

With most themes, both do the same thing, which is to replace the content area of the page when viewing single posts with the content generated by the template.

The main difference is that Views Content Templates are simpler, you just add the markup (and insert shortcodes for custom fields) directly into the template.

Layouts is our page builder where you can drag and drop content in cells which are laid out in a grid you choose.

Otherwise they are essentially the same, so the answer to 1 is Yes.

The slider cell available in Layouts is for displaying a "static" slider, which is to say that you choose the images you want to include from the Media Library, so that the same images would be used on every page that uses the Template Layout.

If you want a "dynamic" slider, where the images to be used come from your posts' custom fields, there are now 2 options.

If you have a repeating image field (i.e. a custom image field where several images can be added to the same post) then you need to manually enqueue a slider library of your choice and then generate the markup in the format required by the slider. I wrote detailed steps about doing that here: https://toolset.com/forums/topic/how-to-display-the-pics-i-uploaded-as-a-slider/#post-518295

However, there is now a simpler option.

Make a repeatable field group for your images (that contains an image field and perhaps a text field to use as a caption, too, though it can just contain the image field itself).

Repeatable field groups create child posts that act as containers for each group of fields attached to a post, which means that you can then use the built-in slider functionality of Views described here:
https://toolset.com/documentation/user-guides/creating-sliders-with-types-and-views/

Such sliders transition between posts (rather than between images of the same post), but because of how repeatable field groups work, you can create a View where for the content selection you choose the repeatable field group in question, and then you add a Query Filter for the repeatable field group to identify which post the images will come from.

Do you want to try that and if you get stuck let me know.

#914740

We have created a repeatable field group with two custom field with Title and Description. We want to show this field group as Accordion. It means when we click on the title it should show related description. How can we get this with "Layout Accordion Cell"?, i.e. how can Layout Accordion automatically fetch title and description from field group?

Also, we are using Toolset Map. In a map, we have multiple markers. We want to show "a route map" from marker-1 to marker-2. Means if in a map there is five marker then map must show a route like this: Marker-1 -> Marker-2 -> Marker-3 -> Marker-4 -> Marker-5 -> Marker-1 . How can we get this?

#915141

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

The Layouts accordion cell is like the slider cell, it is for "static" accordions, meaning the title and contents of each section are determined when you create the accordion cell by the text or other content you add, you cannot dynamically populate them from a repeatable field group.

You can achieve that, but, as I described for sliders above, it involves creating a View for your repeating field group that includes a Query Filter that specifies to which post the repeating field groups belong, and then having your View output markup in the required format for an accordion.

Unless you have disabled it, you will have Bootstrap 3 available, so the markup for your accordions needs to be based on this: hidden link

If you try to implement that and get stuck let me know.

Please note that the forum has a policy of one issue per thread, so the maps question should be asked in another post.

But I can tell you here that directions are not currently supported in Toolset Maps, though we have an outstanding feature request to include it. We will soon have a public feature request system where you will be able to upvote such features.

#915216

Thank you!

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