All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Change sort order setting without reordering entries

dadogdamastar 3 Feb 2011 09:56 question, complete

Hey,

Got another question. Is it possible to change the sort order setting without reordering the ordered entries?

My client has reordered all his entries (950 entries!) but now want's the new entries on top instead at the bottom. I can change the setting and this works perfect, but the results gets turned around ... anyway around this behavior?

Replies

  1. Low 3 Feb 2011 10:50

    I'm afraid not, unless you're up for some custom php'ing to recalculate the order those entries.

  2. dadogdamastar 3 Feb 2011 11:06

    Some custom php'ing shouldn't be a problem. Already looked at the code but don't really know where to start ... I can alter the sort_order function once set all the settings to desc and then set everything back.

  3. Low 3 Feb 2011 11:23

    What you need is to reset the order number all the entries. Here's how you could go about it:

    - BACKUP YOUR DATA!
    - Create a temporary template with php enabled
    - Enter code, something like this: http://pastie.org/1524567
    - Load up template in browser (just once!)
    - Delete template

    The PHP code in that pastie is untested, but should work, I guess. Be sure to enter the correct field id.

  4. dadogdamastar 3 Feb 2011 11:42

    Ok thank you very much, i'll check it out!