I am outputting a list of channel entries. Each entry has 2 category assignments but I need to sort the list alphabetically by one of the categories.
Here is my current code that sorts alphabetically by entry title:
{exp:channel:entries
channel="properties"
orderby="title"
sort="asc"
dynamic="no"
disable="category_fields|member_data|pagination"
}
<tr>
<td>{title}</td>
<td>{categories show_group="4"}{category_name}{/categories}</td>
<td>{categories show_group="5"}{category_name}{/categories}</td>
<td>{property_sqft}</td>
<td><a href="{url_title_path='our-properties/detail'}" class="pluslink">View Property</a></td>
</tr>
{/exp:channel:entries}
So I basically need to sort the entries by {category_name} of category group 5.
How can I achieve this?
Thanks for any help.