Adding sections to other pages and templates in Debut Theme without duplicating the section code.

Highlighted
Shopify Partner
113 1 11

Hi! So I managed to add sections in other pages such as product pages or normal pages by adding the code { % section 'desired-section' %} on the template's code. However, I noticed that if I want to use for example 2 Feature Row sections in my About page, I have to create feature-row1.liquid and feature-row2.liquid because using the same section, would render the material (images and text) placed on the section customization widget. 

On the contrary, on the home page you can add as many sections of the same type and not having this issue. I added a page with about 10 sections that needed different images and I had to create 10 section templates and add them, is there a way I can add the sections without duplicating them?

1 Like
Highlighted
Shopify Partner
9213 1178 3243

Hello, @Jose13 

Thanks for post.

Please share your site URL,
So I will check and provide a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
1 Like
Highlighted
Shopify Partner
113 1 11

Thanks! This is my store. I'm trying to use the liquid sections to add them to product pages and more. I've been able to do that, but for example if I add a section the contains images, every time I paste that section code, the images loaded will always be the same. I want to be able to customize that section without having to create duplicate sections. 

0 Likes
Highlighted
New Member
1 0 0

Would you be able to share the template you created for your about section? I have been trying to recreate something similar but have struggled!

0 Likes
Highlighted
Shopify Partner
113 1 11

Sure, created a new page template with this code:

<div class="section-header text-center">
        <h1>{{ page.title }}</h1>  
      </div>
{% section 'my-costum-page' %}

{% section 'feature-row-2' %}

{% section 'rich-text-2' %}

{% section 'newsletter' %}
I had to create those section, though. They're just duplicates of existing sections (except for 'newsletter' which is the default newsletter section).

 

0 Likes
Highlighted
Tourist
25 0 1

Hey! Did you ever manage to figure out the best way around this? I'm thinking the same thing, it's possible on the home page so it has to be possible on the templates I've created, would love to know what you've learned!

 

Thanks!

0 Likes
Highlighted
Shopify Partner
113 1 11

Hey! Sadly, no. Just as I was doing it before, duplicating the section, copying the code and then on the template calling that new section. It works fine but you have to create a new section each time you want to add a section with new content, so it's not an ideal solution. If I eve find out how to do so properly, I'll get back at you.

0 Likes
Highlighted
Tourist
25 0 1

Thanks so much for the swift reply.

 

And right back at ya, if I figure out a better way to make it work I'll let you know! 

 

 

1 Like
Highlighted
Shopify Partner
1445 195 521

You can't reuse sections on pages. You could use blocks to create multiple instances of the same section on a page one after the other, but say if you wanted like a featured row section, then a image with text overlay, then another featured row, you would need to create multiple featured rows. It's an annoying limitation that is currently being resolved by shopify, they should be rolling out Sectioned Themes in the (hopefully near) future. 

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
Highlighted
Tourist
25 0 1

Thanks Ninthony!

It is definitely annoying, as I was so happy with the layout!

I've moved blocks over from the homepage theme into the new page, and now I'm going to try implementing css grid to get those blocks in the format I want. But not sure if this is going to work, I just want a 2fr column with a rich text block and a 1fr column with a rich text block, but it's far more difficult than I though it would be! 

0 Likes