0

The below code no longer works with EE2.9 Have tried determining how to change it but cannot work it out. I just need to specify that if ANY of the fields exist, display the content (div/header/row/info).

Any help is appreciated!

{if jumper_colour|sash_colour|tie_colour|saddle_colour|rally_colour}
<div id="container">
<h4>CLUB COLOURS</h4>

  {if jumper_colour}<div id="row">
    <div id="ff"><h5>Jumper:</h5></div>
    <div id="ee"><p>{jumper_colour}</p></div>
  </div>{/if}
  {if sash_colour}<div id="row">
    <div id="ff"><h5>Sash:</h5></div>
    <div id="ee"><p>{sash_colour}</p></div>
  </div>{/if}
  {if tie_colour}<div id="row">
    <div id="ff"><h5>Tie:</h5></div>
    <div id="ee"><p>{tie_colour}</p></div>
  </div>{/if}
  {if saddle_colour}<div id="row">
    <div id="ff"><h5>Saddle Cloth:</h5></div>
    <div id="ee"><p>{saddle_colour}</p></div>
  <div>{/if}
  {if rally_colour}<div id="row">
    <div id="ff"><h5>Rally Uniform:</h5></div>
    <div id="ee"><p>{rally_colour}</p></div>
  </div>{/if}

</div>
{/if}
1

Ok finally worked out that all i needed to do was add a double pipe character between fields.

{if jumper_colour || sash_colour || tie_colour || saddle_colour || rally_colour}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.