Forum
Display only if multiple conditions are met
Can I have a perch:if
tag that checks for multiple values? I've got a title that I want to check if 2 values exist and appear only if they both do.
First I tried using <perch:before>
on the <ul>
and <perch:after>
on the </ul>
but it's already inside a <ul>
that has that, which I guess is why it's not working.
Thanks :)
You can nest
perch:if
tags.Perfect! Thanks :)
Actually, can I do something that would be like an 'or', so if item 1 or item 2 exists then display something?
And if what you need to output is to big to repeat, put it in a sub template.
Fantastic! I've nested an else there too, so that nothing is returned if neither condition is met:
Thanks for your help!