Feeling dumb... Can't add sections to page templates (OS 2.0 Empire theme)

Solved
jmp
Excursionist
19 2 42

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.

Capture.JPG

Accepted Solution (1)

Accepted Solutions
jmp
Excursionist
19 2 42

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.

View solution in original post

Replies 15 (15)
jmp
Excursionist
19 2 42

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.

alek1986
Excursionist
20 0 11

That was very helpful!

Thank you

KadirRugs
Tourist
4 0 3

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

alek1986
Excursionist
20 0 11

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

KadirRugs
Tourist
4 0 3

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

alek1986
Excursionist
20 0 11
KadirRugs
Tourist
4 0 3

Really thank you so much.
I managed to do it.
You are really awesome. 😀😀🙏

TradeSuperstore
New Member
2 0 0

Hey would you mind sending me the video to hello@tradesuperstoreonline.co.uk please - really struggling with this too. Thanks in advance! @alek1986 

Outerpreneur
Shopify Partner
18 0 3

Hi @TradeSuperstore , 

 

I believe this is what I have shared with @KadirRugs 

 

https://www.loom.com/share/5c7cf4920f7344a690f19f73176f99a4

 

Let me know if you struggle with it,

 

Regards,

 

@Trad

Ecommerce Developer & Brand strategist
TradeSuperstore
New Member
2 0 0

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 

Outerpreneur
Shopify Partner
18 0 3

@TradeSuperstore 

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.

Ecommerce Developer & Brand strategist
dropknox
New Member
2 0 0

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

Outerpreneur
Shopify Partner
18 0 3

@dropknox 

 

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.

Ecommerce Developer & Brand strategist
PaulNewton
Shopify Partner
4209 303 901

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 

Finally Combinable Discounts - EARLY ACCESS ONLY - Use Free Shipping With Other Discounts

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org
Problem Solved? ✔Accept and Like solutions to help future merchants
Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com
rpi3
Tourist
4 0 9

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 %}