I'm making a custom section for Shopify theme using Liquid and the code for /sections/mytest.liquid is below.
I expect to see the section with red border, and I expect to see the section ID in the browser console.
It doesn't work because shopify is ignoring my stylesheet. And it always says section ID is missing. what am I doing wrong?
<div id="fish1">
Hello this is the threshold -- {{ section.settings.threshold }} --
</div>
{% javascript %}
console.log('THE SECTION ID IS ' + (section ? section.id : 'MISSING'));
{% endjavascript %}
{% stylesheet %}
#fish1 {
border: 1px solid red;
background-color: cyan;
}
{% endstylesheet %}
{% schema %}
{
"name": "test Header",
"settings": [
{
"type": "range",
"id": "threshold",
"min": 300, "max": 1000, "step": 10, "unit": "px",
"label": "Threshold",
"default": 760
}
],
"presets": [
{
"category": "My Stuff",
"name": "My Test"
}
]
}
{% endschema %}