Search by

johnhenry / matrix-block-anchor

johnhenry

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

Documentation

Type:craft-plugin

pkg:composer/johnhenry/matrix-block-anchor

Fund package maintenance!

john-henry

Buy Me A Coffee

Statistics

Installs: 43

Dependents: 1

Suggesters: 0

Stars: 1

Open Issues: 1

3.3.1 2026-09-07 11:22 UTC

README

Stable Version Static Badge

Matrix Block Anchor for Craft CMS

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 (blockIdAnchor by 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.

John Henry - Craft CMS Plugins