ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Custom sort order

August 04, 2010 1:16pm

Subscribe [2]
  • #1 / Aug 04, 2010 1:16pm

    Brian M.

    529 posts

    I’m curious if anyone has set up a page that returns entries in a custom sort order, and if so how you went about doing it.  So for example, instead of just orderby=“state” sort=“asc”, you actually return them based on a field like orderby=“state” but then a custom sort order (for example I need to return results by a custom order of northeastern states like ME, CT, NH, VT, etc.)

    I need to do this across multiple fields and the custom ordering will change based on user input as well as other entry fields, it isn’t static.

    Thanks for any thoughts!

    EDIT: Oh,  I’m currently using the 1.x branch of EE (am I not supposed to be posting here?), but we will be upgrading to 2.x at some point so if it’s easier there then we could wait.

  • #2 / Aug 05, 2010 3:09pm

    Boyink!

    5011 posts

    Sure..I’ve just created a sort-specific field for those purposes before.

  • #3 / Aug 05, 2010 3:25pm

    Brian M.

    529 posts

    Each time the page is shown, the order will be different based on a variety of criteria (some from a form on the page, some from other entry values in a different weblog/section, also from custom fields for each member (each page is customized to each user).  I’m assuming what you’re talking about won’t handle that, unless I’m not understanding?

  • #4 / Aug 05, 2010 3:34pm

    Boyink!

    5011 posts

    Nope - it was me who didn’t understand.

    Honestly - like a bit of a nightmare… :red:

    It’s tough to say based on what you’ve described so far, but I’ve a feeling you might be in for either some PHP work, or some custom query work or possibly both.

    There are a number of 3rd party add-ons for EE that affect the sort order, however, so would first suggest perusing devot-ee.com.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases