Liquid, JavaScript, themes, sales channels
Hi Guys,
After trying Dawn 2.0 theme, I decided to try Empire theme since it seemed to suit my needs more. Since it is an OS 2.0 theme, I should be able to have sections on every page, right? The problem is, when I create a new page template, it shows "No theme sections available for this template." In fact, it says this for almost every type of page in the theme.
In Dawn 2.0, I can just create a page template and start adding all the sections I could normally have on the Home Page. So now I feel kind of dumb. Hopefully, I can correct this myself in the code, but I need someone to please point me in the right direction.
In theory, I should be able to do this, right? Unfortunately, my theme is not published at the moment since I can't resolve this issue, so I can't give you guys a URL. All I really need is a simple page where I can put a few collection lists.
Thanks if you can help.
Solved! Go to the solution
This is an accepted solution.
Argh! Never mind I figured it out!
In case someone happens to be in the same situation, I'll tell you what the issue was.
For each Section that you want to be available in a page template, you have to scroll down to the bottom of the section liquid and within the {% schema}, add "page" to the templates list, like so:
{% schema %}
[...]
"templates": [
"index",
"product",
"page"
]
}
{% endschema %}
I knew it would be something dumb like that.
This is an accepted solution.
Argh! Never mind I figured it out!
In case someone happens to be in the same situation, I'll tell you what the issue was.
For each Section that you want to be available in a page template, you have to scroll down to the bottom of the section liquid and within the {% schema}, add "page" to the templates list, like so:
{% schema %}
[...]
"templates": [
"index",
"product",
"page"
]
}
{% endschema %}
I knew it would be something dumb like that.
That was very helpful!
Thank you
Hi
I am having the same problem. But I couldn't solve this problem. Can you help me ? I would really appreciate it if you could help me.
How and where do we paste the code you say below? If necessary, I can give a certain fee.
Can you send me a video?
Thank you
HI Kadir,
Is quite easy, go to your sections and do the following @jmp couldn't explain it better.:
For each section that you want to be available in a page template, you have to scroll down to the bottom of the section liquid and within the {% schema}, add "page" to the templates list, like so:
For example, if you wish to add a gallery section to a page, go down to templates.. add "page", don't forget to add a coma after the previous listed item.
Let me know if you can manage, otherwise, I can send you a video
Hi
Can you give me a video?
I've been trying to solve this problem for 3 days.
Email: info@vintageoushakrug.com
I will not forget your kindness. Thanks
Really thank you so much.
I managed to do it.
You are really awesome. 😀😀🙏
Hey would you mind sending me the video to hello@tradesuperstoreonline.co.uk please - really struggling with this too. Thanks in advance! @alek1986
Hi @TradeSuperstore ,
I believe this is what I have shared with @KadirCevik
https://www.loom.com/share/5c7cf4920f7344a690f19f73176f99a4
Let me know if you struggle with it,
Regards,
@Trad
Thank you for sending this over that has worked! I have another issue which i think is related, I'm unable to add a subcollection to a collection page - do you have any idea how to solve this on the Empire theme? Thanks
I believe I have been there.
You have to make sure that you have sub-collections available. Go to the collections menu on your dashboard, choose one collection example and change the template to a subcollection. If you are working on a theme that is not live at the moment, you might have to create the sub-collection manually on the live theme first (with the same sub-collection template name) . There is good documentation about this on Pixel Union / Out of the sandbox theme if this is the case.
https://support.pixelunion.net/hc/en-us/articles/1500007721682-Empire-templates-Subcollections
If this is not what you are talking about, please formulate your question a bit better and we can look into this a little bit closer.
Much appreciated Outerpreneur! Sort of shocked Pixel Union didn't enable the most important feature in the OS 2.0 update. The most recent Empire review is bad because of this. This user is hinting that it's a more complex fix. Any idea as to why or is the above fix all you need?
Most recent Empire review:
"I'm pretty disappointed that this theme does not truly have Sections Everywhere like I would expect a Shopify 2.0 theme to have. I now have to convert pages to Shopify 2.0 json file templates myself - pretty dispositioning considering all $FREE 2.0 theme come with this baked in. Sections available on PAGE templates should be standard for any theme to be sold as "2.0" the Shopify store, no?"
Anyway much obliged.
.: pl
Hi, I have mostly used pages for our website so I wasn't bothered that much. I spoke to support. They will roll out a new version with sections everywhere in march.
Just a note the templates setting is an inclusion list, so if you need a section to be more freely available you should just be able remove the templates attribute, or just add every page type.
https://shopify.dev/themes/architecture/sections/section-schema#templates
https://shopify.dev/api/liquid/objects/request#request-page_type
Save time & money ,Ask Questions The Smart Way
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
Just wanted to add for anyone else that runs into this issue:
My solution was needing to add "presets" with a name to my Section schema: https://shopify.dev/themes/architecture/sections/section-schema#presets
Without having the "presets" in the block below, the section was not available for selection at all.
{% schema %}
{
"name": "Page Hero",
"tag": "section",
"settings": [
{
"type": "text",
"id": "title",
"label": "Hero Title",
"default": "Page Title"
}
],
"presets": [
{
"name": "Page Hero"
}
]
}
{% endschema %}
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024