error when trying to loop through grouped entries according to dropdown field I was trying to follow this example from stack overflow to loop through a list of entries and output them by a custom dropdown field



{% set allEntries = craft.entries.section('resource').find() %}
{% set allEntriesByCat = allEntries|group('entry.resourceType') %}
{% for cat, entriesInCat in allEntriesByCat %}
    &lt;h2&gt;{{cat}}&lt;/h2&gt;
    {% for entry in entriesInCat %}
        &lt;article class="resource"&gt;
            &lt;h3 class="resource__name"&gt;&lt;a class="resource__link" href="{{entry.resourceLink}}"&gt;{{entry.title}}&lt;/a&gt;&lt;/h3&gt;
            &lt;div class="resource__content"&gt;{{entry.resourceContent}}&lt;/div&gt;
        &lt;/article&gt;
    {% endfor %}
{% endfor %}


But if I do that, I get the error: Internal Server Error
Craft\EntryModel and its behaviors do not have a method or closure named "entry".
You have to remove the entry from your entry.resourceType

{% set allEntriesByCat = allEntries|group('resourceType') %}


will work