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

Support archive

Add set_name to exp_low_reorder_sets

trif3cta 8 Oct 2012 19:54 idea, complete

It would be great to have set_name as an alternative to the set param (set_id).

I have an extreme edge case, but I imagine it could come in handy to others.

I have 2 EE installs with 10 sites each. Each site has 5+ Low Reorder fields (now sets).

I used to call them like {{site_short_name}_reorder_field_name} so I could run every site from one common template. I could pass the orderby to Channel Entries tags, Playa Module, tags, whatever - life was good.

Now I need to know the set ID ahead of time for every set, on every site. I can surely create a massive associative array with them hard-coded, but yuck.

It would be rad to be able do this:
{exp:low_reorder:entry_ids set_name="{site_short_name}_set_name_ftw"}

I still might run a query the on the set_label column to return the ID dynamically to get around this.

Probably a crazy idea, but I figured I'd post it. Thanks for considering.

Replies

  1. Low 9 Oct 2012 09:08

    I figured it'd be only a matter of time before someone asked for this. :)
    I'll put it on the list.

  2. trif3cta 9 Oct 2012 15:46

    Thanks man, much appreciated it. Here's my lovely workaround for now in case somebody needs something similar (template needs PHP on input):

    $set_id_sql = "SELECT set_id FROM exp_low_reorder_sets WHERE set_label = 'Videos, Order' AND site_id = '{site_id}' ";

    $set_id_query = $this->EE->db->query($set_id_sql);

    $set_id = $set_id_query->row('set_id');

    $lro_entry_ids = "{exp:low_reorder:entry_ids set='" . $set_id . "'}";

  3. Natacha 2 Nov 2012 08:50

    I definitely need this too! Amazed this hasn't been implemented yet since hard coding ids is such a nono especially when moving sites around from local dev to staging to live.

    Thanks for your response trif3cta - I will use this!

  4. Low 2 Nov 2012 08:52

    You'll be happy to know that this will be in the next version.

  5. trif3cta 2 Nov 2012 14:49

    Thanks Low, you're the best.

  6. Low 5 Nov 2012 16:51

    Now in version 2.1.0!