Copy link to clipboard
Copied
I've tried:
{% assign color = {{module_url param='color' -%}} -%}
{% if color == 'red' -%}
<p>Red is the color</p>
{% endif -%}
and lots of variations and nothing works.
Hi there . A few errors with the above.
Modules are not double braces, only single.
You also do not need to use that module if you are using liquid to access a parameter. I suggest using the reference quite closely to help you.
Filters | Business Catalyst Support
Just access the parameter in the url using -
{{globals.get.color}}
{% assign color = globals.get.color -%}
{% if color == 'red' -%}
<p>Red is the color</p>
{% endif -%}
Or even shorter:
{% if globals.get.color == 'red' -%}
<p>Red is the color</p>
...Copy link to clipboard
Copied
Hi there . A few errors with the above.
Modules are not double braces, only single.
You also do not need to use that module if you are using liquid to access a parameter. I suggest using the reference quite closely to help you.
Filters | Business Catalyst Support
Just access the parameter in the url using -
{{globals.get.color}}
{% assign color = globals.get.color -%}
{% if color == 'red' -%}
<p>Red is the color</p>
{% endif -%}
Or even shorter:
{% if globals.get.color == 'red' -%}
<p>Red is the color</p>
{% endif -%}