Navigation überspringen

[Gelöst] Build Logic of View vs. Content Template?

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 3 years, 11 months. 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
- 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 -

Zeitzone des Unterstützers: Asia/Hong_Kong (GMT+08:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von janO-3 vor 3 years, 11 months.

Assistiert von: Luo Yang.

Author
Artikel
#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!