Sauter la navigation

[Résolu] Loop template in View breaks BB Themer design

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem: I have placed a View in one of my BB Themer designs. When I activate this element in BB Themer, the page layout is broken.

Solution: Limit the use of Loop Templates in Views and other implementations of Content Templates when using 3rd-party templating systems like BB Themer, Elementor, etc. Content Templates often conflict with these other 3rd-party templating systems, so if you replace the Loop Template shortcode (wpv-post-body) in the loop of a View with the contents of that template, you can avoid this compatibility issue. See the screenshots below for more details about this.

Relevant Documentation:
https://toolset.com/course-lesson/using-toolset-with-beaver-builder/

This support ticket is created Il y a 4 années. 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Kristian Adolfsson Il y a 4 années.

Assisté par: Christian Cox.

Auteur
Publications
#2080193

I am trying to:
Add a banner image dynamically via a View below the header.

Link to a page where the issue can be seen:
lien caché
page completely broken.

This is the Themer template that breaks it, it has a View in it.
lien caché

If you turn that off
"Internal Banner Ads CONTENT CLOSE"

on this page
lien caché

and turn on
"BBDanny Test" that only imports a static image, it works.

You can do anything you want on the staging site.

Cheers

#2080739
Screen Shot 2021-06-08 at 3.12.46 PM.png
original.png
update.png

Hi, I think the main issue here is the use of a Content Template inside the View's loop. Content Templates can often conflict with other templating systems, so I edited the View here:
lien caché

I copied the contents from the loop template:

<a href="[types field='link-url' output='raw'][/types]">[types field='logo' title='%%TITLE%%' alt='%%ALT%%' size='full'][/types]</a>

Then I placed that content directly inside the wpv-loop tags instead of using a separate Content Template:

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
	<wpv-loop>
        <a href="[types field='link-url' output='raw'][/types]">[types field='logo' title='%%TITLE%%' alt='%%ALT%%' size='full'][/types]</a>
	</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

This bypasses the need for a nested Content Template, which seems to be the root of the problem here. Whenever possible, limit the use of Content Templates in your Views content and you'll be less likely to experience these conflicts with 3rd-party templating systems like BB Themer. There is a checkbox in the Loop Wizard you can uncheck when creating or editing Views that will help in this scenario. Please review these screenshots, the current setup, and the results, and let me know if the problem is not resolved.

#2081067

Hi Christian

Ah, as simple that. Had no idea!
Thanks A LOT!
Will look at all our Views with Templates. We have a map problem on an other site that this might solve as well. It's way more complex though with custom pins etc.

Cheers

#2081069

My issue is resolved now. Thank you!