What's your biggest current challenge? Have your say in Community Polls along the right column.

Re: add different collapsible contents in different pages?

add different collapsible contents in different pages?

Bingling
New Member
10 0 0

Hello all the experts!

 

I would like to ask you for help.

How can I add just personalized collapsible content to different pages?

Because once i added one block, it was automatically as block model which applied to all the pages.

I am using the template DAWN

For example

I have several link pages IN THE FOOTER: 

Return and exchange - with three collapsible contents

Payment - with two collapsible contents (different from the return and exchange collapsible contents for sure)

and some other pages I don't need collapsible content at all.

Thank you in advance!

Best

 

Replies 6 (6)

magecomp
Shopify Partner
451 31 47

Hello @Bingling 

 

To add personalized collapsible content to different pages in the Dawn theme, you can use the following steps:

  1. Go to your Shopify admin and click on Online Store > Themes.
  2. Click on the Edit Code button for the Dawn theme.
  3. In the Sections folder, open the file for the page that you want to add collapsible content to. For example, if you want to add collapsible content to the Return and Exchange page, open the footer.liquid file.
  4. In the footer.liquid file, find the collapsible-content block. This is the block that contains the collapsible content.
  5. Copy the collapsible-content block and paste it into the footer.liquid file for the other pages that you want to add collapsible content to.
  6. In each collapsible-content block, update the content with the content that you want to display.
  7. Save the footer.liquid file.
  8. Go to the front end of your Shopify store and check the pages that you added collapsible content to. The collapsible content should now be displayed on those pages.

Here is an example of how you would update the collapsible-content block to add personalized content to the Return and Exchange page:

 

<section class="collapsible-content">
<h2>Return and Exchange</h2>
<div class="content">
<p>We offer a 30-day money-back guarantee on all products. If you are not satisfied with your purchase, you can return it for a full refund.</p>
<p>To return a product, please contact us within 30 days of purchase. We will provide you with a return shipping label.</p>
<p>Once we receive your return, we will process your refund within 7 business days.</p>
</div>
</section>

 

Helping voluntarily. Please like and accept the solution if it helps. Thanks!
Our Bestseller Shopify Apps    |      Mobile App Builder by MageComp    |      Shoplock Hide Pages/Collections

Need a developer?  Just visit MageComp website
Bingling
New Member
10 0 0

Hello Thank you for your reply.

Actually all the clicks are in the FOOTER, returns and exchanges, payment etc. 

And in the footer.liquid, there are more than 600 lines.

I searched carefully and I didn't find the collapsible-content block.

Is there a shortcut to search?

 

and is there any possiblity to do it in the personalized CSS on the page itself?

Thanks again!

 

Bingling
New Member
10 0 0

Here is the screenshot,

I added one collapsible-content block and now every click on the footer, which means "contactez nous", "A propos de nous" "Terms et conditions" etc are all having the same collapsible-content block. 

IMG_7421.PNG

gr_trading
Shopify Partner
1973 146 205

 

@Bingling request you to refer below video. Which use metafield to add different data in collapsible content.

 

If you need more advance option ping us for more detail.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
Bingling
New Member
10 0 0

Hello! Thank you for your reply.

I have tried the metafield, as shown in your video, however, on the description it is only allowed with max 100 words. I have far more than 100 words for one line.

And I couldn't add the image aside.

Do you have any more solution? Thank you!

gr_trading
Shopify Partner
1973 146 205

For text limit did you try rich text instead of using multiple line as field.

 

And yes, collapsible row don't support image for this you have to code it in theme.

 

I can do this if its a job, let me know your thoughts?

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee