Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 634 Bytes

README.md

File metadata and controls

12 lines (9 loc) · 634 Bytes

'Group By' for ExpressionEngine

This simple ExpressionEngine extension adds SQL style 'group by' (aggregate) support to the {channel:entries} tag pair. Pass a 'groupby' parameter in your channel entries loops (currently only supports standard entry fields and custom fields by id; 'field_id_1')

{exp:channel:entries channel="advertising" groupby="field_id_1"}
{title}
{/exp:channel:entries}

In the example above this is being used to output banner ads which are related (with field_id_1) to a sponsor and ensure that only 1 ad from each sponsor is shown.