Liquid, JavaScript, themes, sales channels
Hi,
I've added a "subtitle" node to the "collection-list" settings in settings_data.json as shown here, but the text is not found. The spot in the HTML where the text should appear is blank.
Can anyone spot an error in my code? I am new to liquid.
Thanks!
Here's the relevant part of settings_data.json:
Solved! Go to the solution
This is an accepted solution.
Theme settings are all stored in settings/settings_data.json
Schema definitions for theme settings are stored in settings/settings_schema.json
However, for each section it's schema is defined in respective liquid file under sections.
And if you want to inject your setting into section settings, you need to add it's definition to the schema part into respective section file for it to be visible in your liquid.
However, if you inject your variable into theme settings it will be visible even without declaration.
Here are the knowledge base links for your reference: https://shopify.dev/docs/themes/sections and https://shopify.dev/docs/themes/settings
Thanks for the prompt reply.
Are those json files? I don't see section_schema.json or theme_schema.json. I only see settings_schema.json.
...and the string 'collection-list' only occurs in these files
This is an accepted solution.
Theme settings are all stored in settings/settings_data.json
Schema definitions for theme settings are stored in settings/settings_schema.json
However, for each section it's schema is defined in respective liquid file under sections.
And if you want to inject your setting into section settings, you need to add it's definition to the schema part into respective section file for it to be visible in your liquid.
However, if you inject your variable into theme settings it will be visible even without declaration.
Here are the knowledge base links for your reference: https://shopify.dev/docs/themes/sections and https://shopify.dev/docs/themes/settings
Thank you!
It works perfectly after I added this bit to the schema in "collection-list.liquid", right under the existing "title" schema.
-------------------
As a business owner, have you ever wondered when your customer's first impression of yo...
By Skye Jun 6, 2023We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023