Skip to content

Instantly share code, notes, and snippets.

<input type="{{ interestedin.value }}" value="checked" name="fields[interests][]" {% if checked %}checked="checked"{% endif %}>
<ul>
{% set alreadyUsedTags = [] %}
{% for entry in craft.entries.section('databytes').limit(null).find() %}
{% set series = entry.series %}
{% if series | length %}
{# What do I add to this for loop to just display the first entry that has the same tag? #}
{% for series in series %}
{% if series not in alreadyUsedTags %}
Loop through your Matrix blocks.
{% for block in entry.matrixField %}
Find the block you're looking for.
{% if block.type == 'myBlockHandle' %}
Make sure there are actually some images/assets select
{% if block.myAssetField | length %}
Loop through the assets