Hopefully this will be easy to sort.
One of my custom channel fields is a select dropdown.
I have created a low variable matrix field, which contains two columns.
Column 1 is "Name" & Column 2 is "Description"
When displaying the single entry, I want it to show the name & description in my markup, based on what was selected in the custom field.
Not quite sure how to do this.
{exp:low_variables:pair var="lv_custom"}
<h5>Random text to display {name}</h5>
<p>{description}</p>
{/exp:low_variables:pair}
Thats my starting point, but I need to somehow make it match the Name against the name that is selected in the custom field.
Any ideas? Thanks.
or I'm open to a better way of doing it!
EDIT I've scrapped it for now. Think I was over complicating things.
Gone with this instead in my within my channel entries tag...
<h5>Random Text<strong>{custom_field}</strong></h5>
{if custom_field =="Option One"}<p>Description One.</p>{/if}
{if custom_field =="Option Two"}<p>Description Two</p>{/if}
{if custom_field =="Option Three"}<p>Description Three</p>{/if}
Ideally I wanted a way to control the Descriptions within the CP, as opposed to hard coding it, but this works fine.
Thanks!
{if custom_field =="Option One"}{lv_description_one}{/if}