Log in
Log into community
Welcome to the Liquify Community
New post
Most posts
Powered by
Hall
Home
Members
Hendrik
H
Hendrik
Offline
, last seen 2 weeks ago
Joined November 7, 2024
Contributions
Comments
Replies
H
Hendrik
3 weeks ago
Β·
First questions
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