Hey! So I'm trying to create a custom li-settings input to let users change the background color of certain sections in the shopify editor. I've found the the li-settings:custom instructions and have tried applying it to my use case but to no success. Could someone take a look and maybe suggest what I'm doing wrong?
What I've done:
Added an embed element in webflow inside of the section I want the setting to relate to.
Added the attribute li-settings:custom="Background-Color" to the embed element.
Added an attribute style="background-color: {{section.settings.background-color}}" to the section which background color should be changed.
My guess is I'm formatting the setting schema wrong, couldn't find much clear instructions on it in Liquify Pro or Shopify documentation.
Hi @Jonathan Fors, i found to issues. You cant put any other attributes ont the li-section tag. Shopify renders the section on there own. I would wrap the section content inside a div and apply the styling on this element. It looks like in you embed there is a forbidden charakter. Have never seen this. But after { there is something wired. VS Code also noticed this. Can you try this json instead: { "type": "color", "id": "background-color", "label": "Background Color", "default": "#EDEDE9" }
Hey @Jonathan Fors, I think the problem is "value" in your case. Shopify does not support "value" in the color picker, instead you can use "default" like so:
Hi @Jonathan Fors, i found to issues. You cant put any other attributes ont the li-section tag. Shopify renders the section on there own. I would wrap the section content inside a div and apply the styling on this element. It looks like in you embed there is a forbidden charakter. Have never seen this. But after { there is something wired. VS Code also noticed this. Can you try this json instead: { "type": "color", "id": "background-color", "label": "Background Color", "default": "#EDEDE9" }
Amazing @jonas.halbstark this worked, thank you! Not sure if it was the forbidden character, the li-section tag or both but it's working. So this is resolved now π