I’ve built a few sites that share a similar requirement, and in various situations I’ve dealt with it in several different ways. I’m wondering if there’s a “best practice” for dealing with this situation, and I thought I’d list my tactics to see which if any are recommended.
The basic situation is, I’ll have a blog that has items, but those items are not date sensitive. In other words, it’s a list of things, like news on a certain topic, or reviews, or journals, or just static pages. These are things that aren’t (very) date sensitive.
My client will then want to be able to order those items in the order that makes most sense to them. In an arbitrary way, you might say. This is so they’ll show up on an index page in a certain order, and also so that people can go to previous and next entries.
They’ll also then want to be able to re-order those entries from time to time, adding a new one in, or shifting them around.
So, that’s the situation. Here are some solutions I’ve come up with:
1) If dates really don’t matter, you can use the EE entry date as an arbitrary value, and tell the client to change each item’s entry date to change the order. This works extremely well in some ways: EE’s built in sorting, and prev/next feature, works properly. But it’s a pain in the butt to go into each entry to change the date, and the widget isn’t as easy to change as, say, a simpe pulldown menu on the main entry screen. Plus, it’s hard to remember what exactly you need to change the date to.
2) I’ve used the “related” field type to create a pretty cool “previous”/“next” functionality. But the problem with this is that it doesn’t let you put all the items in order without a killer query.
3) I’ve used a text field that lets the user put in an arbitrary value. But because it’s a text field, if they enter 3 4 or 5, that sorts after 1, 11 or 120. And, it doesn’t deal with duplication, and you have to go into multiple entries to reorder anything.
4) I’ve used a pulldown that has the values 01,02,03…20,21,22,23,24,25. Problem is, this isn’t expandable to an aribtrary number of entries. Plus, it doesn’t stop duplication. And, “01” just looks kind of dumb instead of “1”
5) I’ve built a custom page that runs a database query that reads and sets a field, and reranks items to remove duplicates. So far, this seems to be the most effective way. BUT, it doesn’t clear caches when it does this, the way editing an entry does. And, it’s very custom and is a lot of work, which is why I’ve only done it for one client.
So, I’d really like to know how anyone else is handling making arbitrary rankings of semi-static content.
