Skip Navigation

[Résolu] Trying to understand how to use Views, Layouts, Content Templates

This support ticket is created Il y a 7 années et 10 mois. 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 réponses, has 3 voix.

Last updated by Luo Yang Il y a 7 années et 10 mois.

Assisted by: Luo Yang.

Auteur
Publications
#401727

I am trying to get a better overall understanding on how I should be using Views, Content Templates, and Layouts together - and when to use one instead of the other. I'm working on a project that would look something like a Vehicle Classifieds website, though that's not really what it is. In terms of the layout and functionality though, that would be one of the closest examples to give you an idea of what I'm building - various pages with lists of posts with sorting and filtering options. And then a vehicle post type with a bunch of custom fields.

I just don't quite get how I should be using Views, Content Templates, and Layouts to build it. I started out trying to build a View and then started using Content Templates. And then I played with Layouts. It looks like there is a lot of overlap on how you can use all three. Is there a tutorial that covers how to use them all together and when to use one instead of another when building pages out? I'm just not sure where I should be styling the elements (or blocks) of the pages.

With the type of site I'm using can you give me some examples on how I'd use them when structuring the vehicle post type and then the list pages? I'm using the Customizr theme and have Layouts integrated. I've watched some of the Youtube videos but am still a little lost. Maybe I just haven't watched the right video yet.

Thanks in advance.

#401739

Yeah, it's pretty messed up. I don't work here, but just went through same thing a few weeks ago (check my posts if you like).

I think the problem was that I was looking at "Toolset" like an application that was designed to be used a specific way. What finally helped me get half a grip on the thing was to imagine (realize) that there is no "Toolset" application - that's just branding for a handful of components that were designed independent of a comprehensive application.

Thus, you might imagine there is no Toolset administrative control panel. (There actually is at "/wp-admin/admin.php?page=toolset-settings", but for the concept you can imagine there isn't.) Unlike many plug-ins that have a fully functional core and then offer you additional "addons", I don't think Toolset itself does anything without the "components". I don't think the thing works that way.

Since I use Genesis themes, I don't use Layouts at all. As far as I can tell, Layouts essentially allow you to re-create the entire page including header, footer, everything. Instead, I create Views that themselves generate content templates (which can be edited from with inside the View's configuration page or independently by looking for them under Content Templates).

You can also create your own content template by going to the Content Templates menu item and just creating one. When you get to the Content Templates administrative interface to create a new one, you will see the existing ones listed and among them will be the ones that were created by any Views you created. They are pretty obvious, in my experience, since the names of content templates generated as part of the process of creating a View all have names that start with "Loop item in" and then the name of your View.

Anyway, on the page where I want to include a view, I select it from the "Fields and Views" button attached to the editor of that page. It inserts a short code for the view in the content area of that page and I continue to edit the page as desired.

Like I said, I'm new at this too, so I don't know much more to tell you, but hopefully this will help get you started. By the same token, if you find some error in what I've told you, I would appreciate you sharing that too.

Good luck and be well.

#401857

Dear Chris,

The content template of Views plugin is for render the post content, for example you assigned a content template to a single post, the content template will be rendered in the area of wordpress function the_content(),
http://codex.wordpress.org/Function_Reference/the_content
If you assign a layout to a single post, then the layout will be rendered in the area of Layouts function the_ddlayout(),
https://toolset.com/documentation/user-guides/layouts-theme-integration/

Q1) Is there a tutorial that covers how to use them all together and when to use one instead of another when building pages out?
You can add view cell (Posts loop) and content template cell (Single post) into Layouts, see our document:
Adding Views to Layouts
https://toolset.com/documentation/user-guides/adding-views-to-layouts/
Content Template Cell
https://toolset.com/documentation/user-guides/content-template-cell/
And you can check more documents about Layouts plugin here:
https://toolset.com/documentation/user-guides/#layouts

Q2) give me some examples on how I'd use them when structuring the vehicle post type and then the list pages?
That depends on what you need, I suggest you create a new thread for it, and describe details for the structure you are going to achieve.

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