This tag is used to set a variable.
name="something" - The name of the variable.
value="something" - The value of the variable you’re setting.
default="something" - Crate a default value for the
<r:set_var name="archive_month" value="Dec2015" default="Nov2015" />
You can also set the value by not self-closing the tag:
<r:set_var name="salary_range"> I'm the value </r:set_var>
To expand on the example above, you can also set variables via Custom Data:
<r:set_var name="archive_month"> <r:page:content name="archive_month" /> </r:set_var>
Note: Do not to use dashes (
-) in variable names. Dashes
are considered “minus” logic and will have unintended consequences.
This tag is closely related to
Last updated on January 2, 2020.
We welcome all questions, feedback and bug reports. If you're having an issue, we usually need the following information:
- A brief description of the issue
- A link to the page where you saw the issue
- Screenshots that illustrate the problem - How do I take a screenshot?