Low variables & simple conditional
Hi Low,
I should be able to figure this out, but it's stumping me.
I have an early-parsed LV that outputs a value based on member group. The LV itself outputs fine.
However, when I tried to do even a simple conditional it fails:
My Plan: "{membrr_my_plan}"
Test: {if membrr_my_plan == "FRE"} YES I AM FREE! {/if}
Results simply in:
My Plan: "FRE"
Test:
I've tried using {if "{membrr_my_plan}" == "FRE"}, {exp:low_variables:parse var="membrr_my_plan"} to no avail.
What am I missing?
Thanks!
Replies
Low 8 Mar 2014 16:21
What is the type and content of that variable?
ejaeDesign 8 Mar 2014 16:25
Hi Low,
It's textarea and here's the content:
If I'm logged in as admin, it outputs "ALL" minus quotes. If not logged in, it should output "FRE" minus quotes.
Low 8 Mar 2014 16:32
That's a false assumption.
Early parsed variables are equal to Snippets. They are put inside the template early on in the parse order. The vars and tags inside the value will then be parsed by the template parser itself.
You might want to look at creating a custom plugin to directly output the value you need.
ejaeDesign 8 Mar 2014 16:45
Ah - I see. Makes sense. Thanks for the quick response!