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

Support archive

Using a Low Variables fieldtype as a filtering parameter in C:E loop

Rick 29 Jul 2015 14:58 question, complete

I'd like to check if something is possible via Low Variables. I want to create a Select Channel variable to generate a list of 5 channels (each channel corresponds to an expedition). I want to then use that list as a select field in the field set for a 6th channel, which hold info about team members. Thus I assign an expedition to a particular team member.

Would I then be able to use the assigned 'expedition' as a limiting factor (eg. search:xxx parameter) on a channel:entries tag outputting the team members -- ie. that C:E loop outputs only the team members for a specific expedition.

The reason I'm uncertain about it is that the documents say that "only non-hidden and variables with early parsing *disabled* show up in the variable list in the Publish Form", but don't I need early parsing *enabled* in order to use the variable as a parameter in a C:E tag? Am I misunderstanding this?

Lastly, I'm aware that there are other ways to achieve the same result (I could just build a regular 'select' field for the Team members channel and populate it with the necessary channels manually, removing LV from the equation entirely, but getting an answer to this question will give me a clearer understanding about what I can achieve with you add-on.
Many thanks.

Replies

  1. Low 29 Jul 2015 15:06

    I want to create a Select Channel variable to generate a list of 5 channels. I want to then use that list as a select field in the field set for a 6th channel.


    This is not possible with LV. The LV fieldtype will list the variables themselves, not their value.

  2. Rick 29 Jul 2015 15:19

    Ah, okay, thanks. I misunderstood then. So for instance I could have a variable group called 'contact options' containing variables lv_email, lv_phone, and lv_skype (each with their respective values) and then in a publish field I could let the editor choose between those three variable names. And then subsequently parse them in the template using a parse tag. Is that correct?

  3. Low 29 Jul 2015 15:22

    That's correct. And you don't have to use the Parse tag if the values are simple; you could then just use {my_channel_field:var} as well.

  4. Rick 29 Jul 2015 15:25

    Right. Thanks for the insight.
    (Apparently with my first question I've managed to find the ONE AND ONLY thing that LV can’t do, because it sure seems to be able to do everything else!) Thanks again.

  5. Low 29 Jul 2015 15:27

    Well, that, and I still can't get LV to make me a sandwich. ;)

    Rick 29 Jul 2015 15:33

    Tsk. Developers. *Always* with the sandwiches.