I’ve built a House and Land package section on a website using a collection and then a grid to display the content.
This worked great on the filter page, but the issues come when I’ve used the same grid on each of the Individual lot pages. Using conditional logic to hide the house designs that do not apply to that lot I’ve now got blank spaces in the grid instead of them simply disappearing.
I’m guessing I’ve built it the wrong way so any help would be grateful.
The issue can be viewed here.
Here’s the grid version working
If you mean collection list or CMS-page conditional visibility, then the conditionally hidden items still exist in the HTML,
and still still take up space in the grid layout.
I’ve looked at your HTML since you haven’t shared a designer link. It’s actually not the fact that you’re using conditional visibility that’s causing the problem - it’s how you’re using it.
If you want the entire list item to disappear from the grid, you’ll need to make the entire list item conditionally visible.
Try configuring that on the list item directly.
The result is this- 1 works, on the outer list item element. 2 doesn’t work it’s just hiding sub-elements within the list item.
Thanks @memetican, I’d have to look into that.
That said, do you know if using a grid and hiding elements is the best way to achieve this effect? Should I be building it differently?
See my edits in the post above.
Sorry for not sharing the right link, I’m new to all this. Does this link allow you to see what I’ve done?
I tried the logic on the main div containing all the elements but didn’t see any changes. See the link above.
Not on the div, on the collection list item itself.
It’s the bottom most of the 3 purple collection list parts.
Put the filter here ( indicated in green ). Remove it from all of your sub elements, I’ve indicated some in red, but there might be others.
You can see it shows no gaps in the grid when you have the right element conditionally hidden.
Note only a few of your Lots have house designs, most will be empty currently.
I’m showing #192 here.
Absolute legend! Thank you for taking the time to help me out.
Oh, just while I have you. How could I make the line above the grid ‘Available home designs for this homesite’ disappear if no home designs are shown on the page?
If you have DIV wrapper or section of some form containing both the collection list and your other elements, you can use this-