[SOLVED] Conditions inside repeater with ul and li

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.

ok I have resolved my issue thanks to https://dynamic.ooo which I had a licence even if never used it before.

So for those interested, I first define a variable outside of my relationship query loop to get the post_id of the page:

{set:postid {post:id}}

then this is the power shortcode being defined as ‘list_product’:

{acf-loop:product_repeater {if:{eq:{post:title @ id={acf:product || 0}} {post:title @ id={args:||0}}}
   [<li>{post:title @ id={acf:decors || 0}}</li>]
}}

and this is how it is being called:

{power:list_product {get:postid}}

it get some time to get used to dynamic.ooo but once you go trough all the docs, it’s really powerfull if you don’t like to writte php functions like me.