Last active
August 29, 2015 14:21
-
-
Save richardsongo/6ee1de84033f54c9ba3d to your computer and use it in GitHub Desktop.
Conditional statement if an entries relation field is empty?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% if entry.fieldHandle |length %} | |
| {{ entry.fieldHandle}} | |
| {% else %} | |
| {{ global.fieldHandle}} | |
| {% endif %} | |
| How can I conditionally display content if its a specific section? | |
| {% if entry.section.handle == 'lettings' %} | |
| {{ entry.rentFrequency.label }} | |
| {% endif %} | |
| Conditional dependent on the length of a field within a matrix field: | |
| {% if block.destination | length > 25 %}<br />{% endif %} {{ block.smallCost }} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment