string group_by

This tag renders the grouped channel entries in your template. Any parameter or tag variable that is used for {exp:channel:entries} is available here. The parameters and tags listed on this page are additional to the exp:channel:entries documentation.




This parameter is required. This parameter represents the tag-data that groups entries.

If author_id is used (see code above) then channel entries are grouped by the {author_id} and can generate a list of authors and their entries. Please see the Authors example in the tutorials.

A date can be passed into this parameter to group entries by the publish date for example. Using group_by="entry_date format='%Y, %M'" as the value of the parameter will achieve this grouping. Please see the Date example in the tutorials.

If you are having trouble grouping your entries there is a good chance that you have disabled certain channel entries data using the disable parameter. For example if grouping by a custom field first make sure that custom_fields is not present in the disable.

Single variables



Returns the counter for the groups (not the channel entries) starting from 1. This behaves like the {count} tag.



Returns the total number of groups containing channel entries.



Outputs the total number of channel entries in the group.

Variable pairs



Channel entries appearing in the the current group are output using the tag-data encapsulated by this tag pair.

Any tag-data appearing outside of this tag-pair will be treated as the group's header and footer content. If you are grouping by the author_id and you place the {author_id} outside of the {channel_entries} tag-pair it will be used as the header or footer of the current group.

Please see the examples provided in the tutorials.

Releases RSS Feed © Copyright 2017 | Policies All prices shown are in Australian Dollars ($AUD) Newism