Welcome to the Liquify Community

Home
Members
Hendrik
H
Hendrik
Offline, last seen 2 weeks ago
Joined November 7, 2024
Hi! I'm just starting out reading the documentation and looking at the starter template. I've got a few questions:

Can I inject liquid like this inside Webflow? I want to use this inside a for loop.

{%- for option1_name in variants_option1_arr %}
{%- case option.position %}
{%- when 1 %}
{%- if variants_option1_arr[forloop.index0] == value and variants_available_arr[forloop.index0] %}
{%- assign option_disabled = false %}
{%- endif %}
{%- when 2 %}
{%- if option1_name == product.selected_or_first_available_variant.option1 and variants_option2_arr[forloop.index0] == value and variants_available_arr[forloop.index0] %}
{%- assign option_disabled = false %}
{%- endif %}
{%- when 3 %}
{%- if option1_name == product.selected_or_first_available_variant.option1 and variants_option2_arr[forloop.index0] == product.selected_or_first_available_variant.option2 and variants_option3_arr[forloop.index0] == value and variants_available_arr[forloop.index0] %}
{%- assign option_disabled = false %}
{%- endif %}
{%- endcase %}
{%- endfor %}

It is possible to add an attribute inside a condition? like this:

<input type="radio" {% if option.selected_value == value %}checked{% endif %}</input>

These were my questions for now πŸ™‚
10 comments
j
H