How to implement accordion or tabs for product description in a Pagefly template?

Hey Community,

I was looking for a solution where I can divide long product descriptions into Tabs by using a heading tag and found this solution.

Store Password: 1234

It works fine on the default theme product page template for one product: https://gamestreaming.myshopify.com/collections/frontpage/products/3m-command-ad

But on the product page, I created a product template using @PageFly-Victor it’s not showing tabs: https://gamestreaming.myshopify.com/collections/frontpage/products/product-2

The tabbed descriptions don’t work on the product page template created with Pagefly.

I tried finding the {{ product.description }} line in the product.pagefly.170ea8ee.liquid found under the templates folder, but it’s not there.

Can someone help me in implementing the tabbed descriptions in the Pagefly product template?

Regards,

Sarv

I figured it out.

You can create a custom product page template using Pagefly and call tabbed product descriptions by the following method:-

  1. Create a new snippet called tabbed-description and use this code (it should include the code from the tutorial above, use the gist link below for complete code):

Get code here: https://gist.github.com/tairli/aecb41ffd3ffc0c08ba502636461fb97

  1. Replace the Product Descriptions element with HTML/Liquid Pagefly element.

Paste the following code in the HTML / Liquid Code Editor

{% include ‘tabbed-description’ %}

  1. Click Save and Close and then hit Publish!

Result:

For more information regarding the Tabbed Descriptions read this thread by @tim_1 .

Thanks to Donny from @PageFly-Victor .

Sarv

1 Like

Thank you so much for this guide! How did you make the line under the tabs not go all the way to the right?