Skip Navigation

[Resolved] Can layout plugin auto fetch data from post fields and custom repeatable field?

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

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 5 replies, has 2 voices.

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

Assisted by: Beda.

Author
Posts
#913794

I am trying to fetch fields data to be automatically presented in the layout. But I don't see a way to do this via layout. Though, I can do the same in the content template.

I am not getting what is the use of layout plugin in the toolset. It looks like a completely different plugin which is not integrated/connected with other toolset plugins like types and views.

Please help if I am missing something.

#913864

With Toolset Layouts you do basically the same as in Content Templates unless you use a fully (with custom code) integrated theme.
There are Template Layouts (Toolset > Layouts) and Content Layouts (Any Post Type > Edit > Content Layout Editor)
Both are edited the same way with a Drag And Drop interface using Bootstrap Framework as output.

If you do not use a fully integrated theme, you will replace (usually) the_content() part of the theme, just as Content Templates do.
You will thou be able to design this with a Drag And Drop Bootstrap Builder where you can use several Cell types to insert, where for example Content Template Cells or Visual Editor Cells allow you insert ShortCodes as you are used to from Content Templates themselves.

These Layouts can then be added to one or several posts - just as Content Templates.
Or, you can design single Posts with the Content Layouts, which will then apply on to this single post.

If you fully integrate your theme with Custom Code, then you can even apply the Template Layout to the entire Theme template (header, footer, sidebar, etc)
This requires custom code - I can only provide a simple and well (in the code) documented Theme that you can use for research purposes and as a base for your own work:
hidden link
But this is not something we provide in the support here.
I can show you an example, if you require some more detailed help, but I cannot code it for you.

Toolset Layouts as well integrates (just like Content Templates) to certain Themes options:
https://toolset.com/documentation/recommended-themes/
Note that not all themes there should be used with Toolset Layouts.

Please let me know if you have anymore doubt in regard!

#914160

I am using default genesis framework theme without any custom codings.

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

My simple question is.

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?

#914217

The question you asked - as I understood it - was about "what Layouts is for", and related to something that you seem to be able to do in Content Templates - which you mention to be automated data fetching - and I assumed to be the ShortCodes which you can insert in the Content Templates.

This is possible too in Layouts.
Just open any Layout, add a Visual Editor Cell or Content Template cell and start adding the ShortCodes you wish.
They will do the same as in Content Templates - display the (dynamic) data they are supposed to.

If you mean something else by Can layout plugin auto-fetch data from the posts fields like the custom template do? Yes or No?", please outlined the steps that you take and results it brings.
I know of nothing else but ShortCodes which provide a sort of "automatic" data fetching as those will display the content dynamically deepening on the content type you view.

If I understand your question correctly, the answer is Yes.

But then, now I see your point in the question, which comes to light with this:
If yes, then, I have custom repeatable image field, how can I fetch these image in layout image slider?

No, you cannot do that.
Toolset Layouts Image and slider cells cannot be populated with ShortCodes or repeating Fields.

To do what you mention you'd do this in a View first - just as used to if you do not use Toolset Layouts.
Then, you insert this View as a Cell to the Layout.

The Cells you mention are just for single Images, or "standalone" sliders made with specific bootstrap markup.
You could, however, always use Custom Code and create a custom cell:
https://toolset.com/documentation/user-guides/creating-custom-cells-unique-functionality/
https://toolset.com/documentation/programmer-reference/layouts-cells-api/

I apologize that I did not grasp the real question at the first attempt!

#914218

change status.

#914219

Thank you!