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

Support archive

Dynamically set reorder set

danethomas 21 Jun 2012 02:48 question, complete

Hi Low,

I tweeted abut this yesterday but I haven't solved it. I do have Low Variables so that is available for me to use.

Just looking for some advice on how best to do this.

I have two channels, help-category and help-articles.

There's about 8 categories and I have a separate sets, using a search filter in Reorder so we can easily reorder articles for a given category. I decided to use a channel with a playa field to link articles to categories so I have more control over the custom fields in each category.

What I'm trying to do is to dynamically set the Reorder set in my {exp:low_reorder:entries} tag.

There is a custom field in the help-category channel {category_sort} where I insert and save the set ID from Reorder.

So what I want to do is before I render my help-articles channel I want to be able to grab the {category_sort} (probably using the Playa Children tag) and then use that to dynamically assign the set.

Happy to restructure this or start fresh if there is a better approach?

Replies

  1. Low 21 Jun 2012 09:11

    Hi Dane,

    Untested, but you could try this: http://pastie.org/4125320

    Getting to the {category_sort} variable will require going through the channel:entries tag and the playa:children tag. Using the low_variables:single tag together with the preparse: parameter will make sure the value of the {category_sort} variable will be passed on to the LV before it hits the template, while making sure no conflicts exist because of nesting the tag inside the others.