Hi. I have a list of <li>’s with people in as follows:
{exp:channel:entries channel="our_people" category="{cat_id}" orderby="title" sort="asc"}
<li><a href="http://{title_permalink={segment_1}/{segment_2}/{segment_3}}class=active">{title}</a></li>
{/exp:channel:entries}I need to order them by surname then forename. I came up with a way to do this in mysql (below) but I’m not sure how to get {exp:channel:entries} to use this. I tried putting the concat(..) statement in the orderby=”“ parameter but no luck. I’m not so keen on using a {exp:query} tag to do it as I imagine it would be quite complicated, is there any other way?
SELECT cat_id,
concat(substring_index(title,' ',-1), substring_index(title,' ',1)) as title_order
FROM exp_categories order by title_orderAny help much appreciated!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.