Collapsible rows block

Collapsible rows block

Start your free trial
Start your free trial

General

Online store speed
Online store speed
Accessibility
Accessibility
Theme updates
Theme updates

Theme styles

Style presets
Style presets
Colors
Colors
Fonts
Fonts
Animation
Animation
Social media
Social media

Header

Announcement bar
Announcement bar
Mobile menu
Mobile menu
Search bar
Search bar

Sections

Products

Product listings
Product listings
Product badges
Product badges
Quick view
Quick view
Quick add
Quick add

Product page

Product template
Product template
Variant chips
Variant chips
Sticky add-to-cart bar
Sticky add-to-cart bar
Sibling product swatches
Sibling product swatches
Product recommendations
Product recommendations

Collection page

Collections template
Collections template
Banner
Banner
Product grid
Product grid
Filters and sorting
Filters and sorting

Cart

Quick cart
Quick cart
Cart page
Cart page
Added-to-cart popup
Added-to-cart popup
Cross sells
Cross sells
Free shipping bar
Free shipping bar
Low inventory warning
Low inventory warning

Pages

Templates
Templates
Home page
Home page
About page
About page
Blogs page
Blogs page
Blog post
Blog post
Collections list
Collections list
Contact page
Contact page
Password page
Password page
Search page
Search page
404 page
404 page

Support

Support policy
Support policy
Shopify vs Theme issues
Shopify vs Theme issues
Store access requests
Store access requests

Collapsible rows block

In the Product template, the Collapsible row block lets you add multiple headings that reveal more text when clicked. It's great for answering common questions or adding further product details in a compact way.

This guide shows you how to set up the collaspible row block on product pages. For a similar feature, see the guide for the Collapsible row list section that you can add to any page.

Set up row blocks

Follow the steps to add a row block with a heading and body text. You can choose to display row blocks in the product overvew's left or right column. You can also insert content from a page created in your Shopify admin.

icon
STEPS

In your theme editor (Customize):

  1. Under Product overview, click (+) Add block and select Collapsible row.
  2. Click on the new Collapsible row block to open the settings.
  3. Select which Column to display the Collapsible row: Either the Right (in the product form) or on the Left (beneath the product media).
  4. Check the Expand by default option to reveal the row content when the page loads.
  5. Change the Heading text to display as the title.
  6. We recommend a heading that clearly labels the content.

    To show different headings on different product pages, you can create multiple templates or use dynamic sources.

  7. Add Body text that will display when the row is opened.
  8. Use the formatting buttons to add text styles, links, or lists. To learn more, see Shopify's Rich text editor guide.

    To show different text on different product pages, you can create multiple templates or use dynamic sources.

  9. (Optional.) Under Page for content, select a page to replace the Body text.
  10. (Optional.) Click and hold the drag handles ⋮⋮ to rearrange the blocks:
  11. Click Remove block in the block settings to delete a block.

    Click the Eye icon to hide or unhide a block.

  12. Click Save.

Add dynamic content for different products

If you want to show different text for specific products, you can use Shopify's metafields and dynamic sources. These features allow you to store custom information for each of your products and automatically display that information on the correct product pages.

Follow the steps below to create metafields for your products, add text to your products' metafields, then use Dynamic sources to connect those metafields to text fields in your theme editor.

Note | For a general introduction, see our Dynamic sources and metafields tutorial.

1. Create metafield for your products

Shopify's Metafields lets you store additional information about your products. You can create custom fields to hold different types of information in your Shopify admin, and enter unique content for each of your products.

The steps below tell you how to add a metafield for storing text that you want to display in the accordion block.

icon
STEPS

In your theme editor (Customize):

  1. Click on a Accordion block to open the settings.
  2. Next to the Heading or Body field, click the Insert dynamic source button and select (+) Add Metafield.
  3. image

    Alternatively, go to Settings > Custom data in your Shopify admin.

  4. Click the Products tab.
  5. image
  6. Click the Add definition button in the top-right.
  7. Enter a Name that describes what information the metafield will contain. For example: "Shipping", "Materials", "Details".
  8. image
  9. Click (+) Select type button and select Single line text or Multi-line text.
  10. Click Save.

2. Add content to product metafields

Once you've created Metafields for your products in the Shopify admin, you can now add content to those fields for your products in the Shopify admin.

icon
STEPS

In your Shopify admin:

  1. Go to your Product inventory in your Shopify admin and open one of your Products.
  2. image
  3. Scroll down to the Metafields section and enter the text for your Accordion heading or text in the metafields that you created.
  4. image
  5. Click Save.
  6. Repeat steps 1 - 3 to enter content to the metafields for each of your products.

3. Insert metafields as dynamic sources

Now that the Metafields of your products have content, you can go to the theme editor to insert a Dynamic source to the Accordion block.

icon
STEPS

In your theme editor (Customize):

  1. Click on a Accordion block to open the settings.
  2. Click the Insert dynamic source button next to Heading or Text field.
  3. image
  4. Select the Metafield that you created.
  5. You can now preview your store to confirm the correct content appears when viewing different products.
  6. Click Save.