Questions tagged [group]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4
votes
1answer
855 views

Paginate Entries by Day

This is giving me a surprisingly hard time. Has anyone tried to paginate entries by date, in this case, specifically by day; i.e.: First page loads today's posts, next page loads yesterday's, then the ...
3
votes
3answers
768 views

Need to access year/month variable when grouping entries by date

Having issues trying to access the year & month variable when grouping entries by month-year. The code is outputting the desired results (ie. December 2014), however I would like to format the url ...
3
votes
1answer
1k views

Group entries by section

How do I group entries by section? I have search results: {% set entries = allowedSearchableEntries.search(query).order('score').limit(100) %} But I want to have SECTION NAME entry 1 entry 4 entry ...
2
votes
1answer
224 views

How can I group a list of tags into ranges of first letters (A–E, F–J, etc.)?

I'd like to be able to fetch a list of tags from a blog section and then group them into ranges of letters. I've used this code to fetch and group a list of tags by first letter: {% set entries = ...
3
votes
2answers
3k views

How Do I group entries by Category and retain fixed Category Order?

I found a solution to grouping entries by category here which is working perfectly but I need the categories in the order they were arranged in the categories tab in the Admin panel. Currently, the ...
3
votes
2answers
1k views

How can I group entries based on a dateTime field?

I am getting all entries from a section like this: // get the parent entry. {% set author = craft.entries.section('mySection').authorId(currentUser.id).first() %} // get the child entries from the ...
1
vote
1answer
148 views

Paginate by Group

I am trying to group entries based on week and then paginate them the same way. I'm not quite sure how to go about setting each page to be a separate week/group though. Thoughts?
4
votes
1answer
841 views

Group by Field in Matrix Field

Is it possible to group by a field within a matrix field. I have a channel of players which holds their details. I have a structure for teams which includes a matrix field for a Player. The Player ...
2
votes
2answers
6k views

Total sum within loop

I have simple loop: {% for total in thing %} {{ total.seatsKids }} {{ total.seatsParents }} {% endfor %} This results in a string of numbers eg. 1 3 4. I want the sum of all numbers. So how do I ...
1
vote
1answer
658 views

Sort entries in a category via entry field

I have a section for Businesses. I also have categories that these businesses can belong to. On each category page I want to list all the businesses that belong to that category. So far so good, but ...