Skip Navigation

[Resolved] Build Logic of View vs. Content Template?

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

Problem:

Should I always create the Content Template first, then various View(s) to place the Content Template shortcode, and afterward add Content Template(s) into a View(s)?

Solution:

If the content template will be used in only one post view, you can create the post view first, and generate the content template automatically.

If the content template will be used in multiple cases, then you can create the content template first, and display the content template shortcode in where you want, for example

[wpv-post-body view_template="my-ct"]

Relevant Documentation:

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-body

This support ticket is created 2 years, 3 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
- 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 replies, has 2 voices.

Last updated by janO-3 2 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#2260485

Tell us what you are trying to do? I think I'm doing it all backwards. Now going back to revamp and clean up a website from earlier years. I think I started out applying the wrong Toolset concept. I have been calling a View in some cases and a Content Template (standalone) in other cases. My logic seems faulty.

Q: Should I always create the Content Template first, then various View(s) to place the Content Template shortcode, and afterward add Content Template(s) into a View(s)?

Is there any documentation that you are following? No

Is there a similar example that we can see? No

What is the link to your site? N/A private

#2260701

Hello,

If the content template will be used in only one post view, you can create the post view first, and generate the content template automatically.

If the content template will be used in multiple cases, then you can create the content template first, and display the content template shortcode in where you want, for example
[wpv-post-body view_template="my-ct"]

More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-body

#2261417

My issue is resolved now. Thank you!

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