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.

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

1 Answer 1

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 %}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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