Buy now for just €35.00
| Compatibility: | EE1, EE2 |
|---|---|
| Latest release: | 2.0.2 (released 2012-01-20) |
| Licensing: | Commercial License Agreement |
Parse tag
{exp:low_variables:parse var="my_var"}
Even if you turn off early parsing, you can explicitly parse your variables using this tag. It also allows for additional fomatting by 3rd party field types.
| Parameter | Description |
|---|---|
var |
Name of the variable you want to parse. Use this parameter only in single-tag mode. Use a colon to separate site name and variable name if you want to parse a variable belonging to a specific site, eg. my_site:my_var. |
format |
Use in combination with the var parameter and Textarea variable type. Format will apply the text formatting to the variable data.
Possible values include br and xhtml as well as any formatting plugin installed, eg. textile |
multiple |
If set to yes, the tag will loop through the different values. Use only in combination with the var parameter.
If the variable has labels (like the Select or Checkbox Group types), you will also be able to use the variable {label}
in the tag pair. |
limit |
Use in combination with multiple="yes" to limit the number of results displayed. |
{exp:low_variables:parse var="my_site:my_var"}
{exp:low_variables:parse var="my_textarea_var" format="xhtml"}
{exp:low_variables:parse}
Some code riddled with {my_var}
and {my_other_var}.
{/exp:low_variables:parse}
{exp:low_variables:parse var="my_var" multiple="yes"}
<p>Number {count} of {total_results}: {my_var} ({label})</p>
{if no_results}No values found{/if}
{/exp:low_variables:parse}
Single tag
{exp:low_variables:single var="my_var"}
In order to avoid conflicts with multiple instances of the Parse tag, both single and paired, you can use the alias {exp:low_variables:single} for single tag use. It is identical to the Parse tag, but meant for single tag use only.
Pair tag
{exp:low_variables:pair var="my_var"}{/exp:low_variables:pair}
In order to avoid conflicts with multiple instances of the Parse tag, both single and paired, you can use the alias {exp:low_variables:pair} for tag pair use. It is identical to the Parse tag, but meant for tag pair use only.
Label tag
{exp:low_variables:label var="my_var"}
You can display the label of any variable by using this tag. Use as single tag only.
| Parameter | Description |
|---|---|
var |
Name of the variable you want to fetch the label from. Use a colon to separate site name and variable name
if you want to parse a variable belonging to a specific site, eg. my_site:my_var.
This is a required parameter.
|
Options tag
This tag pair allows you to display the options for a given variable. Use this in combination with the Checkbox Group, Radio Group and Select variable types.
| Parameter | Description |
|---|---|
var |
Name of the variable you want to parse. Use a colon to separate site name and variable name
if you want to parse a variable belonging to a specific site, eg. my_site:my_var.
This is a required parameter.
|
| Variable | Description |
|---|---|
{value} |
Value of the option. |
{label} |
Label of the option. Same as the value if no label is given. |
{active} |
Set to y if the variable data contains the current option. |
{checked} |
Returns checked="checked" if current option is active. |
{selected} |
Returns selected="selected" if current option is active. |
{total_results} |
The total amount of options. |
{count} |
The count out of the current option. |
{exp:low_variables:options var="my_multi_var"}
{if count == 1}<ul>{/if}
<li{if active == "y"} class="active"{/if}>{label}</li>
{if count == total_results}</ul>{/if}
{/exp:low_variables:options}
<select name="options">
{exp:low_variables:options var="my_site:my_multi_var"}
<option value="{value}"{selected}>{label}</option>
{/exp:low_variables:options}
</select>