Take the 2-minute tour ×
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It's 100% free, no registration required.

Looking to explore solutions for ordering entries in a channel. My current ideas are:

For example purposes let's say this is for recipes and the client wants to be able to pick the order of recipes by some method other than changing the date of the recipe.

1. Add a matrix field, with blocks as entry fields ( for recipes channel ) on the single section (recipes index), where you can select and reorder the entries. Then loop over matrix field to print out the recipes in that order.

Pros: Very easy drag and drop sort.

Cons: Every time a new recipe is added, it as to be manually added to the matrix field.

2. Add a custom field to the recipe channel entry as an integer. Use that integer to sort the entries.

Pros: No extra field on a single section that is somewhat de-coupled from the recipe channel.

Cons: As far as I could find, there is no way to add a column to the entries overview page on the backend of Craft, so you would have to go into each entry and make sure to not have duplicates of the same number. If you wanted to add a new entry at spot 5, and you already had 10 entries, that would be very tedious.

We are brainstorming today, and thinking about what we could make plugin-wise that may add this kind of functionality as well. Will post more info if I come with anything else.

share|improve this question

1 Answer 1

up vote 9 down vote accepted

I'd suggest changing the Recipe section to a "Structure" section type.

enter image description here

This lets the client order the entries with a drag and drop from the Entries tab where they can see the whole list of entries during the reordering.

enter image description here

share|improve this answer
1  
I was just going to recommend that! –  Siebird Jun 26 at 16:35
1  
Nice. This could work for sure. I'm going to leave this open for another 30 or so to see if any other answers come through. I would guess we will take this approach though. –  Bill Columbia Jun 26 at 16:44
1  
I think this makes the most sense. We are still new to Craft and wrapping our head around it. Didn't realize that the relational part of structures was optional :) –  Bill Columbia Jun 26 at 17:06
    
I'm using it on my current project to allow the client to easily order photos on their gallery page. So much easier than adjusting a date or an "order" field in the entry. –  Anna_MediaGirl Jun 26 at 17:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.