Questions tagged [group]
The group tag has no usage guidance.
10 questions
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 ...
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 ...
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 ...
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 ...
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 = ...
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 ...
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 ...
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 ...
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 ...
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?