Last active
June 20, 2022 02:20
-
-
Save mikeott/885416e66340795ac97e0deb0c19e968 to your computer and use it in GitHub Desktop.
Add hero image to shopify page
This file contains hidden or 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
| // Save this to the 'sections' directory... | |
| {% if section.settings.hero_image %} | |
| <img src="{{ section.settings.hero_image | img_url:'master' }}" alt="{{ section.settings.hero_image.alt | escape }}" /> | |
| {% endif %} | |
| {% schema %} { | |
| "name": "Hero Image", | |
| "settings": [ | |
| { | |
| "type" : "image_picker", | |
| "id" : "hero_image", | |
| "label" : "Image", | |
| "info" : "Blah blah blah." | |
| } | |
| ] | |
| } | |
| {% endschema %} | |
| // ...and then include this section to 'page.liquid' | |
| {% section 'hero-image' %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment