nextSiblingOf() and related methods will only work with Structure entries. What you need instead is next() / prev(): https://docs.craftcms.com/api/v3/craft-base-element.html#next (At the time of writing, the 3.x docs seem to be lacking any detail on next/prev methods, but the 2.x docs seem to cover it here: https://craftcms.com/docs/2.x/templating/entrymodel....


I would think that you could hook into one of the template render events like: craft\web\View::EVENT_BEFORE_RENDER craft\web\View::EVENT_BEFORE_RENDER_TEMPLATE craft\web\View::EVENT_BEFORE_RENDER_PAGE_TEMPLATE Alternatively, you might want to check out the source code for the KnockKnock plugin, which intercepts page loads to present a custom password ...


Maybe you can try like this, attribute you seek is twig function not from the craft entry value. {% for i in 1..5 %} {% set field = attribute(entry,'fieldName' ~ i) %} {% if field is defined and field|length %} … {% endif %} {% endfor %}


We may need a bit more info to properly debug this, but I wanted to offer some advice and context surrounding the structure of the loop and fetching data so we can at least make sure we're examining the right content! My suspicion is that this is just a limitation of Craft or PHP's serialization capability, and it's discarding field values that are prepared ...


Typically I use an ids() query to do that kind of thing, as it is usually more efficient than a full-blown .all(), like this: {% set allPartnerIds = craft.entries.section('partners').limit(null).ids() %} {% set tiersInUse = craft.categories.group('catPartnerTeirs').relatedTo(allPartnerIds).all() %} If you have already queried for the partner entries ...


I think you should be able to do this with the Retcon plugin


This works nicely and limits error possiblities: {% if craft.app.urlManager.matchedElement and craft.app.urlManager.matchedElement.uri == '__home__' %} Show on homepage {% endif %}

Only top voted, non community-wiki answers of a minimum length are eligible