Brickspace Lab
Contact usContact ShopifyTry a theme
Space
Space
  • Space documentation
  • Getting started
    • Selecting theme colors
  • Theme typography
  • Guides
    • Using color and option swatches
    • Using device specific visibility
  • Dynamic discount popups
  • Adding product subtitles
  • Adding product badges
  • Replacing "Add to cart" for a product
  • Disable "quick add" for a product
  • Templates
    • Collection template
  • Product template
  • Blog template
  • Article template
  • Sections
    • Sections
      • Announcement
      • Header
      • Cart drawer
      • Menu drawer
      • Search drawer
      • Footer
      • Tooltip
      • Fixed menu
      • Featured product
      • Footer
      • Fixed menu
      • Slideshow
      • Email sign-up
      • Video
      • Alt collection grid
      • Banner
      • Block reveal
      • Blog posts grid
      • Collage
      • Collapsible content
      • Collection list grid
      • Collection list slider
      • Collection slider
      • Comparison table
      • Contact form
      • Countdown
      • Custom liquid
      • Discount
      • Featured collection grid
      • Icon grid
      • Image hotspot
      • Logo list
      • Marquee
      • Navigation slider
      • Product list
      • Recently viewed
      • Rich text
      • Search banner
      • Slider
      • Split banner
      • Static chat
      • Store locater
      • Tabs
      • Testimonial grid
      • Testimonial slider
      • Text highlight
  • General
    • Changelog
      • v2.0.0
      • v1.2.1
      • v1.2.0
      • v1.1.0
      • v1.0.1
      • v1.0.0
    • Known issues and troubleshooting
      • v2.0.0
    • Cloning a demo theme
      • Shimmer
Powered by GitBook
On this page
  • Space: Using the article template
  • Summary
  • Showing a table of contents
  • Create metafield definition
  • Update metafield values
  • Add block
  • Update headings

Was this helpful?

Article template

Space: Using the article template

Summary


The article template showcases the content of a blog post.

Showing a table of contents


Create metafield definition

  1. Navigate to Settings > Custom data > Blog posts

  2. Click Add definition

  3. In the name field type “Table of contents”

  4. Ensure the namespace and key field is custom.table_of_contents

  5. Click Select type and select "Single line text"

  6. Select List of values

  7. Click save

Update metafield values

  1. Navigate to the blog post you’d like to update

  2. Scroll to the bottom and click Show all next to metafields

  3. Enter in values for each heading you want to appear in your table of contents

Add block

  1. In the Shopify theme editor navigate to the blog post template

  2. Click Add block under Article main

  3. Search and select "Table of contents"

Update headings

  1. In Shopify navigate to the blog post you'd like to update

  2. Click the "Show HTML" icon on your blog content

  3. Add id="HEADING-NAME" to your heading tags

    1. The id attribute should match the table of contents

    2. For example, you click a table of contents link you'll notice the URL bar is updated - this will give you the value that is needed for your id attribute

    3. The heading tags should now look like this

      <h1 id="your-heading-text">Your Heading Text</h1>

Last updated 22 days ago

Was this helpful?