Order list of names by surname
Hi,
I have a list that is displaying the {title} tag by the first letter in an A-Z list of names. The {title} tag has both the first name and surname, for example: John Smith.
I would like the list to display A-Z with by the Surname. Below is the code I'm using:
Advisors
{exp:low_alphabet:entries channel="trade_union_forum_advisory_group" alpha_filter="{title}" orderby="last" category="253" limit="10"}
{title}
{tuf_advisory_group_role}
{if tuf_advisory_group_body != ""}
{tuf_advisory_group_body}
{/if}
{/exp:low_alphabet:entries}
I would be grateful if you could help.
Replies
Low 8 May 2014 09:58
Low Alphabet doesn't work like that. It will only sort by the entire content of a given field. If you want to order by Surname, then surname should be a separate field. Then you could use something like this:
The alpha_filter="" parameter is only for displaying entries that match the filter, which should be a single letter. So, adding alpha_filter="s" to the above tag will only display entries where the my_surname_field starts with an S.