Question about liquid

Solved
Highlighted
Tourist
33 0 1

would any of you amazing gurus out there be able to let me know why this:

.section_homepage {
  margin: 0;
.section_heading {
          margin: 0;
          font-size: $heading_font_size;
          text-transform: uppercase;
          font-weight: bold;
          padding: 30px;
          letter-spacing: 0.1em;
          {% if settings.section_headers_bg_color.size > 0 %}background-color: {{settings.section_headers_bg_color}};{% endif %}
          {% if settings.section_headers_alignment == 'center' > 0 %}text-align: center;{% endif %}
}
}
 
is giving me this error
  • Line 2521 — Liquid syntax error: Expected end_of_string but found comparison in "settings.section_headers_alignment == 'center' > 0"

2521 is highlighted in bold

0 Likes
Highlighted
Shopify Expert
10007 116 1823

This is an accepted solution.

This line makes no sense.

{% if settings.section_headers_alignment == 'center' > 0 %}

It is saying if the alignment equals center bigger than 0. Are you looking for match the string or look for something larger than 0? I would guess it should be this:

{% if settings.section_headers_alignment == 'center' %}

 

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
Highlighted
Tourist
33 0 1

Thanks for the assistance, it really is appreciated.

0 Likes