I have created many-to-many relationships and views to display them. I want to display the views if they exist on a template page (using Toolset Blocks). At the moment, the empty view divs are creating blank space on pages where there is no relationship. Is there an "IF" statement I can use?
And/or how can I stop WordPress from injecting <p> tags into Toolset Code in Toolset Block templates. I've tried using the "[noautop]" shortcode, but Gutenberg decides the block contains invalid html and tries to resolve it which results in a mess.
Here is the code of the view in the Toolset Blocks template
Hi, just following up, it looks like you have used the "disable wrapping div around the View" option in this View's settings, am I right? If so, then can you delete everything between the no items found shortcodes, including all spaces and line breaks, like this:
[wpv-no-items-found][/wpv-no-items-found]
I'm not exactly sure why the paragraph tags are being inserted in your case if no items are found...are there conditionals in the loop hiding some items?
OK I've just realised that on this occasion, the <P> tags and <br/> tags in my screenshot are part of a different view and were inserted by me. Apologies for the confusion.
Trying to edit this Toolset Blocks (Beta) template can get quite confusing because the Gutenberg editor seems to be trying to re-write the html in the Toolset Blocks and has definitely injected <p> tags in other "TB Files and Text" layout blocks.
In these templates, the autosave enters a never-ending loop, so it's difficult to save.
Having said all that, I do think TB has lots of potential and am looking forward to the first stable version.
Okay no problem, I have split your autosave issue into a separate ticket since it's a bit different than the original reason this ticket was started. I'll follow up with you there shortly. Thanks!
Thank you for answering my original question and opening a new thread for one of the other issues raised.