nested perch if statements

  • is there a better way to write the following (seems kind of clunky)?


    Code
    1. <perch:if id="sku" match="contains" value="-S-">
    2. <perch:if id="imageVariant" match="contains" value="-or">
    3. <li>
    4. <a href="oranges/<perch:variant id="slug" type="slug">"><img src="<perch:variant id="imageVariant" type="text">" loading="lazy" alt="Fabric swatch: <perch:shop id="title">"/><span><perch:variant id="title" type="text"></span><span class="colour"><perch:variant id="colorVariant" type="text"></span></a>
    5. </li>
    6. </perch:if>
    7. </perch:if>