Skip to main content

Questions tagged [group]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
1 answer
1k 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 ...
cballenar's user avatar
  • 1,419
4 votes
3 answers
964 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 ...
Siebird's user avatar
  • 373
4 votes
1 answer
972 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 ...
mmc501's user avatar
  • 1,789
3 votes
1 answer
3k 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 ...
4midori's user avatar
  • 668
2 votes
1 answer
284 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 = ...
Adam Snetman's user avatar
3 votes
2 answers
2k 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 ...
Damon's user avatar
  • 4,716
3 votes
3 answers
13k 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 ...
KSPR's user avatar
  • 3,788
3 votes
2 answers
4k 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 ...
smartpill's user avatar
  • 107
1 vote
1 answer
1k 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 ...
Steven Thate's user avatar
1 vote
1 answer
219 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?
Christopher Healey's user avatar