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

Support archive

Using multiple Matrix Low Variables in a Matrix Channel Field

Jonathan Longnecker 27 Mar 2015 19:24 question, complete

Hey Low,

Hope you're doing well! I'm just now dipping my toe into the Low Variables pool and of course I start out trying something extra complicated :) Here's what I'm trying to do:

First, in Low Variables (referring to as LV from here on out) I created several Matrix fields that shared the same column names.



Then I created a Matrix field in my main channel with each column allowing the publisher to choose certain LV's.



So far so good. Where I'm running into issues is parsing the multiple values into the LV Matrix field. In the code below {product_design_options} is the name of the main Matrix field and {wall_type} is the column that lets you select multiple LV's.

{product_design_options} 
{embed="_embeds/_design_options" low_variable_prefix="{wall_type}"}
{/product_design_options}


In my embed I'm trying to have it spit out each selection individually.

{exp:low_variables:pair var="{embed:low_variable_prefix}" multiple="yes"} 



{title}
{desc}

{/exp:low_variables:pair}


But because the {wall_type} variable is parsing a string of several LV's it's not working. Ends up looking like var="lv_field1 lv_field2 lv_field3"

So! My question is whether this is even possible? Do I need another embed or is there a different way I should be going about this?

thanks,

Jonathan

Replies

  1. Low 27 Mar 2015 21:00

    You'd need to use the {wall_type} column variable as a variable pair. So try something like this:

    {product_design_options} 
    {wall_type}
    {exp:low_variables:pair var="{var}"}
    {!-- matrix code here --}
    {/exp:low_variables:pair}
    {/wall_type}
    {/product_design_options}

  2. Jonathan Longnecker 30 Mar 2015 13:40

    Thanks Low - that worked perfectly!