Skip Navigation

[Resolved] single template overrided by template for loop block of view

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 0 reply, has 1 voice.

Last updated by willaL 3 months, 2 weeks ago.

Assisted by: Minesh.

Author
Posts
#2804242
override.PNG
template in legacy editor.PNG

Greetings. I am using the legacy editor to create a custom search view. I wish the post type to have different HTML output so I used wpv-conditional shortcode to decide output which template.
However, I noticed the content template in view would override the single content template after editing every time. Is that possible to limit the content template to only used as the loop block for the View?
I created those templates through the legacy view but only one of them is locked for view only.

#2804410

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL and what are the exact steps that I can follow in order to see the issue.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2804559

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you for sharing admin access details but the shared admin access details not working at this end.

Can you please send me working admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2804584

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - when you build the view using the "Loop Wizard" button available with "Loop Editor" section then it will attach the content template to view.
- https://toolset.com/documentation/legacy-features/views-plugin/view-layouts-101/

So, I've created the following test view namely "toolset-test-view" and used the "Loop Wizard" to create content template and added the fields:
- hidden link

It created the "Loop item in toolset-test-view" content template attached to the view "toolset-test-view".
- hidden link

When I edit the content template "Loop item in toolset-test-view" it stays attached to the view "toolset-test-view":
- hidden link

When you have multiple content template with such customizations it seems that is why you see the content template is unassigned or its not a "Loop Item in" content template.

#2804586

I understand your example. However, I need to use multiple content templates for showing different HTML and CSS conditionally.
I think it's the only way to show multiple post types with different styles.

Will there be a solution for assigning multiple loop blocks to one view, or at least preventing post usage from overwriting another template?

#2804589

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

There is no other solution. You can add content tempalte title like "temlate for loop item for x view" so you can not reuse for other purpose.

#2804592

Sorry, I think you may not fully understand what I mean.

What I am trying to say is that even when creating a content template in the view, only the first template created will be attached to the view. Other templates created later will display "No Post types/Taxonomies assigned" on the Content Templates page and won't be categorized under it.

Additionally, when editing other templates that are used in the view but are not assigned, it will take over what other templates have already been assigned. This results in having to manually reset the usage of each template every time after modifications and saving.

I think the fact that "only the first content template can be properly categorized into a view's loop block" is extremely inconvenient, and I even consider this a bug. It's unreasonable because, in the same view, it clearly allows you to assign multiple templates, but in reality, only the first created content template gets bound. This issue leads to a very unsatisfactory user experience.

#2804594

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I totally understand what you mean but currently how is works is as expected. As you shared, we can improve as you said but that would be a new feature request and you can raise a new feature request using the following link:
- https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

The feature request you will file will be handled by concern person and if approved it will be passed to our Devs and our Devs will then work on it in order to add this feature. Please note that there is no ETA on it.

#2804603

Well, thank you, I suppose.