Created
November 19, 2019 03:01
-
-
Save kathy330/96b72ba7a37d400bb33ea1aada3e4d6a to your computer and use it in GitHub Desktop.
Shopify - add cutom field on the sections in the customize page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step0: determind which section you want to modify and inspect the section name | |
Step1: find the template you want to modify and add custom code to the schema | |
(e.g. tempalte -> page-sections-template.liquid) | |
{ | |
"type": "text-and-image" #section name | |
"name": "Image with text" | |
"Settings":[ #adding new section in here | |
{ | |
"type": "text"/"select"/"range"/"image_picker" | |
"id": "color_code" #id that use on the liquid template | |
"label": "Select Color" # label to display on the front end | |
} | |
] | |
} | |
Step2: fetch the code in side the section, so you need to modify the section liquid | |
(e.g. section -> page-block-rich-text.liquid) | |
using {{block.settings.id_you_set}} | |
in the previouse example will be | |
{{block.settings.color_code}} | |
Step3: save the changes, and preview on the customize |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment