2

We would like to show a page which lists all Authors, and their respective entries, eg.

Dan Griffey

  • Entry 1
  • Entry 2

Joe Blogs

  • Entry 1
  • Entry 2

Have tried a few options but alas none working, so would appreciate any help / examples.

  • Are you trying to output a list of authors that have entries in a particular section, or is it site-wide? – Jamie Wade Oct 14 '14 at 12:26
  • Just as per the below. – Dan G Oct 14 '14 at 13:02
6

I would use the group filter:

{% for author, entries in craft.entries.find() | group('author') %}
    {{ author }}
    <ul>
        {% for entry in entries %}
              <li>{{ entry.title }}</li>
        {% endfor %}
    </ul>
{% endfor %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.