Sir Charles
Sir Charles

Reputation: 5

shopify text schema text not showing up

I can't work out why my text filed won't show, this is sections/product.liquid the h1 wont show which tells me it thinks its empty but not only have I set the default but when I go into the editor I change the text it still wont show note: shopify lets me save the file with no errors

{% unless settings.Under_Product_Title == blank %}
  <h1>{{ settings.Under_Product_Title }}</h1>
{% endunless %}
        ....
    {% schema %}
    {
      "name": "Product pages",
      "settings": [
        {
          "type": "text",
          "id": "Under_Product_Title",
          "label": "Under Product Title",
          "default": "30 tablets (30 days)"
        }
      ]
    }
    {% endschema %}

in my template.json for products

    {
  "sections": {
    "breadcrumb": {
      "type": "breadcrumb",
      "settings": {
      }
    },
    "product": {
      "type": "product",
      "settings": {
        "Under_Product_Title": "30 tablets (30 days)!"
      }
    }
  },
  "order": [
    "breadcrumb",
    "product"
  ]
}

Upvotes: 0

Views: 730

Answers (1)

pooh
pooh

Reputation: 46

{% unless section.settings.Under_Product_Title == blank %}
  <h1>{{ section.settings.Under_Product_Title }}</h1>
{% endunless %}
 

    {% schema %}
    {
      "name": "Product pages",
      "settings": [
        {
          "type": "text",
          "id": "Under_Product_Title",
          "label": "Under Product Title",
          "default": "30 tablets (30 days)"
        }
      ]
    }
    {% endschema %}

Upvotes: 2

Related Questions