Skip to main content
added 18 characters in body
Source Link
Rien
  • 71
  • 7

Alright, I did a fix.

Rather than trying to output the low var in my template, I decided to first stash it the same way I stashrenamed my other listingsen, fr and es fields with a prefix label_.

SoIn my template I did this first, in my page type:

    {exp:low_variables:pairparse var="var_eleads_countries"}
       <option value="{stashvar_eleads_countries:code}">   {var_eleads_countries:code}label_{/stash:codesegment_1}}</option>
    {/exp:low_variables:pairparse}
{/exp:stash:set_listnocache}```

AndThe thennocache returnedtag is wrapped around my form, but it's important to close it likeand thisreopen init mywhen stash_template:

```{exp:stash:get_listparsing name="countries_listing"}
here, because otherwise, <optionyou'll value="{code}">have parsing issues on the {codesegment_1}</option> tag.
{/exp:stash:get_list}```
Also, I fixed my typ in the var (*insert shame here*), which had to be var_eleads_countries rather than var_eleads_country.

Alright, I did a fix.

Rather than trying to output the low var in my template, I decided to first stash it the same way I stash my other listings.

So I did this first, in my page type:

    {exp:low_variables:pair var="var_eleads_countries"}
        {stash:code}{var_eleads_countries:code}{/stash:code}
    {/exp:low_variables:pair}
{/exp:stash:set_list}```

And then returned it like this in my stash_template:

```{exp:stash:get_list name="countries_listing"}
   <option value="{code}">{code}</option>
{/exp:stash:get_list}```

Alright, I did a fix.

I renamed my en, fr and es fields with a prefix label_.

In my template I did this:

 {exp:low_variables:parse var="var_eleads_countries"}
      <option value="{var_eleads_countries:code}">   {var_eleads_countries:label_{segment_1}}</option>
  {/exp:low_variables:parse}
{stash:nocache}```

The nocache tag is wrapped around my form, but it's important to close it and reopen it when parsing here, because otherwise, you'll have parsing issues on the {segment_1} tag.

Also, I fixed my typ in the var (*insert shame here*), which had to be var_eleads_countries rather than var_eleads_country.
Source Link
Rien
  • 71
  • 7

Alright, I did a fix.

Rather than trying to output the low var in my template, I decided to first stash it the same way I stash my other listings.

So I did this first, in my page type:

    {exp:low_variables:pair var="var_eleads_countries"}
        {stash:code}{var_eleads_countries:code}{/stash:code}
    {/exp:low_variables:pair}
{/exp:stash:set_list}```

And then returned it like this in my stash_template:

```{exp:stash:get_list name="countries_listing"}
   <option value="{code}">{code}</option>
{/exp:stash:get_list}```