Parsing Low Variable grid set as a Fieldtype
I've created an LV group that manages external article contributors/authors. Each variable in the group consists of a single two column grid containing the contributor's {name} and {url}.
Each variable name and label in the group will change according to who the contributor/author is, eg: News Agency A {news_agency_a}, News Agency B {news_agency_b}.
I then used the variable group to create a single select fieldtype dropdown {contributor_lv} in the Publish Form.
How do I access the LV grid data in the channel's template?
I've tried all sorts of combinations, such as:
{contributor_lv}
{exp:low_variables:pair var="{var}" }
<a href="{url}">{name}</a>
{/exp:low_variables:pair}
{/contributor_lv}
and:
{exp:low_variables:pair var="{contributor_lv}" }
<a href="{url}"">{name} </a>
{/exp:low_variables:pair}
But I'm getting no where. The variables are not set to early parsing, nor are they hidden. What's the correct syntax to access the LV grid data passed through a Fieldtype?
Thanks!
Replies
Low 6 Nov 2018 15:29
Try this inside the channel:entries tag:
Seb Neerman 6 Nov 2018 16:34
Superb.
That worked a treat!
:)