Skip Navigation

[Resolved] Why different number of Templates for this View

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

Problem:
The user asks why a duplicated view has more content templates as templates for this view than the original view.

Solution:
When we create a view, using the loop wizard, we can keep the option to create a content template automatically. If we do not, no content templates will be linked to the view as templates of this view. https://prnt.sc/rzag3a

We can add a content template using the "Content template" button in the view editor. Once we do, the content template is linked to the view as template of the view.

If we do not add it with the button, the template does not get linked. The process of duplicating the view has linked the content templates to the duplicated view directly.
https://prnt.sc/rzaevu

This support ticket is created 4 years, 8 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
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: Africa/Casablanca (GMT+01:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by Pete 4 years, 8 months ago.

Assisted by: Jamal.

Author
Posts
#1585025

Hey Jamal,

Hope you're well, keeping safe and could enjoy your weekend.

Can I ask just, more a question on why something is?

I have duplicated the alternating layouts for another post, just to test I could.

In the view for Luxury Escapes in Cartmel 18898
Under Templates for the View there is a small section called Post Loop - Inversed.

And yet in Our Top Six Dog Friendly Places 18251
There isn't this section, this the one you set up for me.

Now both work and all good however just wondering what am I doing when I replicate this layout?

Many thanks, Pete

#1585065

Hi Pete,

Check this screenshot hidden link If you insert the content template inside the loop editor manually as a shortcode, the view editor does not assign it as a "Template for this view". But if you add it with the "Content Template" button, even though it added as a shortcode just like if we added it manually,the editor assigns it as "Template for this view".

I suppose that the duplication process inspects the loop code and assigns any used Content Template as a "Template for this view".

I hope this makes sense. Let me know if you have any doubts.

Best regards,
Jamal

#1585133

Hi there,

Thank you for moving this to a new ticket, sure understand why 🙂

I guess I can see the logic however, say for the view Luxury Escapes in Cartmel...
The Loop Item has all the code I put in place to the appearance however no CSS.
Yet the Post Loop - Inversed has all the code again and yet this does have the CSS in the editor.

Why is this?

Many thanks, Pete

#1585721

When creating a view the first time, and when using the loop wizard, we can create and assign automatically a new Content Template for the view loop items, it gets added to the "Templates for this View". Check that option on this screenshot hidden link

When I updated the view "Our Top Six Dog Friendly Places" I used the "post-loop-normal" content template for odd items instead of the already created and assigned content template "Loop item in 6 Luxury Places Post Promo" hidden link

I added "post-loop-normal" to both views, and I can see that the CSS is loaded for both "post-loop-normal" and "post-loop-inversed", I suppose that the CSS for "Loop item in 6 Luxury Places Post Promo" was removed before.

I hope this answers your question. Otherwise, please elaborate more, I might have missed something.

#1586533

My issue is resolved now. Thank you!