Tell us what you are trying to do? I have a Heading Block and a View Block... I would like them to be visible only if the View Block outputs some result. In case of nil output in the view, I'd like the Heading and the View to not be shown.. I can't figure out the Conditions that I should use in the IF Conditions.. Please help.
Is there any documentation that you are following?
Unfortunately this is not possible to do as you cannot create a conditional statement based on the View Block output. The conditional block can only perform conditionals based on the post and custom fields.
So you wouldn't be able to achieve this setup of hiding the Heading block if the view doesn't return any results.
It is possible by using the Classic view setup and building your view using the classic editor, however this will require some css and html knowledge to achieve. In the classic view you can simply add the Heading in the [wpv-items-found] section and your heading will only show up when the view finds results.
If you're comfortable with HTML and CSS and want to try using the classic editor to achieve this please let me know.
This one will be quite simple. So you will need to enable the classic editor by going to Toolset -> Settings then scroll to Editing Experience then select the option "Show both the legacy and Blocks interface and let me choose which to use for each item I build".
From there you can go to Toolset -> Views and create a new view. Select your data as you would.
Now when you reach the Loop Editor you will use your Loop wizard to set what data you want to be displayed. Once you have done this, in your loop wizard you will see some generated code similar to this below.
Thanks for the update Shane.. I'll try this out later today as I am prioritizing my other tickets for today..
In the meantime, can you tell me that when you put the H1 heading the way you did, would I have to style it separately? I mean in the Block Editor, I could centralise it, add a background colour and add padding, margin etc.. how would I 'beautify' the heading in a loop editor?
Also as the H1 tag is outside the 'loop' segment I am hoping the pagination animation will not affect the heading.. am I right? I mean if the VIEW content has a pagination and it displays 5 an then fades to another 5, I hope the H1 will remain steady and not get animated. Please do let me know if I am right or do we need to figure out some option for that.
Unless your theme provides a default styling for the h1 tags then you will need to style it manually. All the beautification of the header would need to be done manually with CSS.
Also you are correct to assume that the pagination won't affect the header. The pagination only targets items that are inside the loop tags.