Plugin screenshot thumbnail 1/9
Plugin screenshot thumbnail 2/9
Plugin screenshot thumbnail 3/9
Plugin screenshot thumbnail 4/9
Plugin screenshot thumbnail 5/9
Plugin screenshot thumbnail 6/9
Plugin screenshot thumbnail 7/9
Plugin screenshot thumbnail 8/9
Plugin screenshot thumbnail 9/9

Matrix Block Anchor

"Can you send them straight to the pricing bit?"

An editor wants to link to one block partway down a long page: the opening hours, the pricing table, a question in the FAQ. Matrix gives blocks no anchor an editor can see or copy, so they send the link to the top of the page and hope, or they go asking a developer.

Add the Matrix Block Anchor field to your block entry types, output it as the id in your template once, and every block has an anchor. Editors press the copy button beside it and paste the link wherever they need it.

Copy the link

Readable anchors when you want them

By default the anchor is built from the block's ID, so there's nothing for anyone to fill in. If you'd rather have anchors people can read, turn on custom anchors and editors can type their own, like #about-us or #pricing.

Each custom anchor is checked when the entry is saved. It has to start with a letter, use only letters, numbers, hyphens and underscores, and be different from every other anchor on the entry. If it isn't, the error shows under the field so the editor can sort it out themselves. A block left blank falls back to its automatic anchor.

Upgrading and moving blocks

Automatic anchors come from the block's ID, so moving blocks around the page doesn't change them. If you're upgrading from a version before 3.0, the legacy separator setting keeps your old #blockIdAnchor-123 links working.

What's in it

FeatureWhat it does
Automatic anchorsOn every block, built from its ID
Custom anchorsEditors can set their own, when you allow them
Copy buttonWorks with a keyboard, on revisions, and for people who can only view the entry
Card previewsAnchors show in them
ValidationEach custom anchor has to be valid and unique on the entry
PrefixChange the default blockIdAnchor from the settings or an environment variable
Field UsageA list of where the field is used

Matrix Block Anchor is free. It needs Craft CMS 5 and PHP 8.2 or later.

Accessibility

What's been checked, and anything that still needs work, is in the accessibility statement.

Installation Instructions

To install this plugin, copy the command above to your terminal.

Reviews

This plugin doesn't have any reviews.

Active Installs
330
Version
3.4.0
License
MIT
Compatibility
Craft 4, Craft 5
Last release
September 28, 2026
Categories
Activity (30 days)
0
Closed Issues
0
Open Issues
0
Merged PRs
0
Open PRs