Conditional Logic

This will cause the code snippet it is included in to render only if the condition is met - in this case, this block will only render if the status is equal to active

<div data-pv-do="conditional" data-pv-conditional="{@status@} = active">
    <h2>{@price@}</h2>
</div>

It can be used on the outer block or inner blocks.

Putting it on the outer block will prevent the subsequent lines of code from being rendered if the condition is not met

Putting it on the inner block will prevent the single line of code from being rendered if the condition is not met

Last updated