I need to group and order member profiles alphabetically but I can't get it to work. Have a look here: http://ffsd.de.w0129b45.kasserver.com/mitglieder (It's german but you should get the idea :))
In everything I tried either the groups are ordered correctly or the contents (profiles) of the group are… but never both. Here's the relevant code:
{% set allProfiles = craft.entries.section('members').order('profileLastname').limit(null) %}
{% for letter, profiles in allProfiles|group("profileAlphabet") %}
<ul class="member__index">
<li class="item letter">
<span id="{{ letter }}">
<div class="avatar">
<span class="initials letter">{{ letter }}</span>
</div>
</span>
</li>
{% for profile in profiles %}
<li class="item">
<a href="{{ profile.url }}"><h3>{{ profile.title }}</h3></a>
</li>
{% endfor %}
</ul>
{% endfor %}
As you can see, I'd like to order the profiles by the custom field "profileLastname" and the groups by "profileAlphabet".
Any ideas?