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' %} |
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
| {# Paginate the News entries in groups of 4 #} | |
| {% paginate craft.entries.section('news').relatedTo(category).limit(4) as newsEntries %} | |
| {# Loop through this page's News entries #} | |
| {% for newsEntry in newsEntries %} | |
| {% set entryCategory = newsEntry.categories.first() %} | |
| {# Figure out where this entry should link to #} |
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
| {# Paginate the News entries in groups of 4 #} | |
| {% paginate craft.entries.section('news').relatedTo(category).limit(4) as newsEntries %} | |
| {# Loop through this page's News entries #} | |
| {% for newsEntry in newsEntries %} | |
| {% set entryCategory = newsEntry.categories.first() %} | |
| {# Figure out where this entry should link to #} |
NewerOlder