johnhenry / matrix-block-anchor
Give editors copy-ready anchor links straight to Matrix blocks, auto-generated or custom, no developer required.
Package info
github.com/john-henry/matrix-block-anchor
Type:craft-plugin
pkg:composer/johnhenry/matrix-block-anchor
3.3.0
2026-07-06 01:08 UTC
Requires
- php: ^8.2 || ^8.3 || ^8.4
- craftcms/cms: ^5.0
Requires (Dev)
- craftcms/ecs: dev-main
- craftcms/phpstan: dev-main
This package is auto-updated.
Last update: 2026-07-06 01:09:17 UTC
README
Matrix Block Anchor for Craft CMS
Matrix Block Anchor gives your editors anchor links straight to Matrix Blocks, no developer required. It grabs the block ID itself, sticks a copy button beside it, and that's your job done.
Features
- Automatic Anchor Generation – Grabs the Matrix Block ID and builds the anchor for you, no developer required
- Custom Anchor Support – Let editors set their own readable anchors (
#about-us,#pricing-section) instead of the auto-generated ones - SEO-Friendly - Descriptive anchor text helps your SEO, and the links stay put even when content gets reordered
- Configurable Prefix – Change the anchor prefix (
blockIdAnchorby default) to whatever suits your own conventions - Validation Built-in - Anchor IDs must start with a letter, contain only valid characters, and stay unique within an entry
- Easy Integration – Drops straight into any Matrix block type, no fuss
- Copy to Clipboard - One click and the link's on the clipboard, ready to paste wherever it's needed
- Legacy Support – A setting for anyone upgrading from an older version, so your existing links don't break
Perfect For
- Matrix-based page builders
- Long-form content with a table of contents
- Single-page sites with section navigation
- Documentation and help centres
- Landing pages with anchor-based navigation
Documentation
Full Documentation can be found at https://johnhenry.ie/plugins/matrix-block-anchor/
Requirements
- Craft CMS 5.0 or later
- PHP 8.2 or later.
Support
For support, please visit our GitHub Issues page
License
This package is licensed for free under the MIT License.