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

Support archive

{my_var:data_label} vs {my_var:label}

zizther 5 Mar 2015 14:32 problem, rejected

I am using the {exp:low_variables:parse} tags.
I tried using {my_var:data_label}, as per the docs, but it output nothing, whereas {my_var:label} did.

I don't know if this has changed or not and the docs don't reflect that.

Replies

  1. Low 5 Mar 2015 14:41

    What's the variable type you're referring to?

  2. zizther 5 Mar 2015 14:44

    It is an input variable type.

    Here is the code I tried, which didn't work:
    {exp:low_variables:parse var="color-valid"}
    <label for="{color-valid:data_label}">${color-valid:data_label}</label>
    <input id="{color-valid:data_label}" class="form-element" value="{color-valid:data}">
    {/exp:low_variables:parse}


    Here is the code which worked:
    {exp:low_variables:parse var="color-valid"}
    <label for="{color-valid:label}">${color-valid:label}</label>
    <input id="{color-valid:label}" class="form-element" value="{color-valid:data}">
    {/exp:low_variables:parse}


    I may have misunderstood this tag pair, if it is not meant for something like an input, is this how it should work?

  3. Low 5 Mar 2015 14:47

    As per the docs:

    The variable value’s label, when displaying a Checkbox Group, Radio Group or Select variable type.


    Input type is not supported, nor applicable.

  4. zizther 5 Mar 2015 14:49

    I thought as much, and it was my misunderstanding.
    Is there a tag pair which outputs for input var types, or should i just use separate tags for data and labels?

  5. Low 5 Mar 2015 14:53

    Not sure what you mean; what are you after? The variable's label? Because that's {my_var:label}.

  6. zizther 5 Mar 2015 15:30

    That makes sense, should have tried it :)
    Thanks for your quick replies

  7. zizther 5 Mar 2015 16:41

    I have a input variable called color-valid

    I can output the variable data using {color-valid}, but using{color-valid:label} does not output anything an returns the raw code.

    Does this need to be in a tag pair?

  8. Low 5 Mar 2015 16:44

    The variable syntax (like native Snippets and Global Variables) don't support modifiers or parameters. You'll need to use the tag pair syntax for those to work.

  9. zizther 5 Mar 2015 16:47

    Great, thanks again!