The REEOrder module allows you to easily re-order your entries.
The module uses EE’s ability to order Weblog Entries by a Custom Field, it does not add any queries or other additional processing to your templates.
Installation and usage:
Step 1: Create a new Custom Field in your Field Group, this field will hold the sorting value. You aren’t actually going to use this field. The REEOrder Module will do all the heavy lifting. (The actual sorting.) - The preferred “Field Type” would be “Text Input” - Name it anything you like, and feel free to set any other options
Step 2: Install the “REEOrder” Module
Step 3: In the module’s Preferences page, select the Custom Field you just created.
Step 4: Select a weblog and re-order your entries
Step 5: Create or modify a template and change the “orderby” parameter in the weblog tag to the name of your new Custom Field
Example of the weblog tag:
{exp:weblog:entries weblog="default_site" orderby="your_new_custom_field" disable="categories|member_data|pagination|trackbacks"}
<h3>{title}</h3>
{body}
{/exp:weblog:entries}
If you change Sort Order to “Ascending” in the module’s Preferences, make sure you also add sort”asc” to your weblog tag.
Step 6: (optional) If you like you can install the additional “REEOrder” Extension, this will remove the Custom Field from the Entry Form. (so your client won’t accidentally mess with it).
Let me know if you have any questions.
EDIT: updated to v1.0.1
EDIT 20090203: Thanks to Matt and Brandon you can now sort by drag-and-drop!
EDIT 20090301: updated to v.1.2 This version adds the following:
Version 1.2 requires the “jQuery for the Control Panel” extension to be installed and activated!
Download: REEOrder Module 1.2
This is pretty cool. I’ve been playing around with it. I’d love to see the different ways people would use this. I added multiple “orderby” and “sort” criteria so that it first sorts by number and then by date. I pictured using this in cases where one could rearrange a listing of entries on occasion but otherwise have it list in descending order as usual. The automatic sorting feature in the module area is interesting. I’m curious what this was specifically designed for? To me its kind of like a linklist that you could rearrange quite easily.
Hi Rob,
The module was designed to make it possible to easily rearrange entries in a custom order.
This thread lists some of the ways to accomplish thit but I found that none of these methods were clientproof 😉
Keeping in mind that the module only works with weblog entries, it could be useful for:
Anything you want to give a custom order really.
What do you mean by “The automatic sorting feature in the module area”? The way it sorts, or how it looks?
Thanks for the feedback!
What do you mean by “The automatic sorting feature in the module area”? The way it sorts, or how it looks?
I like how it looks, but I was referring to the sorting. I’m impressed with the functionality of how it automatically resorts (assigns new sort order numbers based on the number of items) when you click the up/down arrows to move the item up or down.
I find that I am a little confused about just how this module works, and how it is different from just setting the orderby to a custom field … but that’s likely down to my brain having been unusually slow of late. ;P
I do wonder if it might be able to help me with a couple of issues, however. Both are related to the problem of 1, 5, 10 coming out as 1, 10, 5 when sorted by EE.
Scenario 1: An EE ‘webring’ where each site receives a numerical ID and this custom field is used for ordering. Unless I create one field for sorting and another field for display and for use in the segments (the ID is used as a third segment for a couple of templates, to determine Next & Previous site), I end up with the wrong sorting order.
Scenario 2: A FAQ where the entries are tagged with section numbers along this line: 1.1, 1.1.1., 1.2.1, etc. Here, too, I am currently using one field for sorting (there the numbers are stored as 01.01, 01.01.01, 01.02.01, etc) and one for display, which I’d love to avoid.
Great tool!
It’s perfect when you have a weblog that has nothing to do with a weblog, but is more a kind of an electronic brochure. You could of course sort it by date but this is better I think.
One thing I’d like to see: The module doen’t show categories an entry belongs to, I know this is difficult since an entry can belong to different categories. Maybe mention all categories that an entry belongs to?
The other way around would be a category tree where you could see all entries and the branches it belongs to, but that’s a different module I guess. (almost the pages module…)
PS: what helps for the client is to put the custom field number in the template like:
{if member_group=='1'} reeoder nr {custom_field} {/if}
I’ve noticed that my entries are going in to the REE-order module different to the edit menu. I installed the module to move one entry around I’m using it for this site and the entries have to be a specific order and my client had left one out! I have it all set up to be ascending, does this explain why the entries are going into REEorder this way?
I have attached a screen shot to show you what I mean.
Thanks
Correct,
When you add a new entry, the custom order field is still empty. You need to re-order your entries to update that empty field.
As you can see the first three entries in your list do not have a sort order yet, that is why they are listed first, and in your case ascending. If you set your weblog tag to this same order and ascending it will look the same in your template.
So what exactly is your question? 😊
Is the module behaving differently than you expected, or do you want to make sure new entries do not show on your website unless you re-ordered them? something else?
I think I was hoping that the entries would be added to the ordered-by-reorder list i.e. (as per image) TEST was listed as number 1 then MARLBOROUGH AS 2 Then DENHAM as 3 etc. Can you have it so that they are automatically to the REE-order list? So they are added to the top of the list, Like an automatic update feature?
Sorry for my inability to explain myself properly! I’m having trouble walking and talking at the same time today!!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.