This is my default output for a repeater on the li:
<ul>
<li>
<div>
Content 1
</div>
</li>
<li>
<div>
Content 2
</div>
</li>
<li>
<div>
Content 3
</div>
</li>
</ul>
What I would like is to have one condition so it wouldn’t display ‘Content 2’ so the desire output would be:
<ul>
<li>
<div>
Content 1
</div>
</li>
<li>
<div>
Content 3
</div>
</li>
</ul>
If we could put condition at the same level of a repeater, it would looks like this and it would work:
<ul>
<li> // Repeater // Condition Not 2
<div>
Content {num}
</div>
</li>
</ul>
As my condition is based on the content of the repeater, the condition can’t be above.
If I put the condition bellow the repeater like this:
<ul>
<li> // Repeater
<div> // Condition Not 2
Content {num}
</div>
</li>
</ul>
The output would have empty li like this:
<ul>
<li>
<div>
Content 1
</div>
</li>
<li>
</li>
<li>
<div>
Content 3
</div>
</li>
</ul>
which I don’t want as I style my li to alternate display, so with this it wouldn’t alternate display.
The only option I see is this but it goes again the HTML specification as ul and li can’t be separated with a div. And morover, I would have empty div.
<ul>
<div> // Repeater
<li> // Condition Not 2
Content {num}
</li>
</div>
</ul>
So if you have any suggestion how you’d do it with bricks I’d be really interested.