WCMS 3 Advent calendar #15: section and block IDs

Wednesday, December 15, 2021
by Leah Sun

Do you know that linking to specific sections and blocks is possible in WCMS 3? Sections and blocks both contain a section/block ID field which can be named and act in the same way anchors do on a page! (Technically, anchors are also IDs.)

The naming convention is case sensitive and may only contain letters, numbers, hyphens, underscores, and periods. The section/block ID must also be unique to the page to avoid confusing the browser. Linking to a section ID is the same as linking to a block ID - by simply adding a # before the the section/block ID name.

section id
block id

These can be extremely useful to direct users to specific content or to highlight certain blocks on a page!

a decorative line

How did you like this tip? Is this something you are already doing, or maybe something you will look to adapt? Have you got a particularly useful dashboard layout that you'd like to share? Are you inspired with suggestions for future tips? Send us feedback!