andrekelling / kirby-anchor-field
Add anchor type field for Kirby Panel
Package info
github.com/AndreKelling/kirby-anchor-field
Language:Vue
Type:kirby-plugin
pkg:composer/andrekelling/kirby-anchor-field
Requires
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-24 15:25:14 UTC
README
A plugin for Kirby CMS.
- provides an anchor field for the panel
Requirements
- Kirby 5.1+ (just tested with 5.1 probably works on previous versions too)
Installation
Download
Download and copy this repository to /site/plugins/kirby-anchor-field.
Composer
composer require andrekelling/kirby-anchor-field
Usage
Add an anchor field to each block blueprint that should be a link target.
- validates a CSS/URL-safe ID
- suggests one of a block's fields named
title,headlineortopline(quite custom probably not your used field names) when focused while empty - validates for duplicate IDs on the same page
fields: anchor: type: anchor
Add an anchorpicker field to the blueprint where editors should create navigation entries.
- lists anchors from the current page
- save the page after adding or changing anchors to refresh the available choices
fields: anchorNavigation: type: anchorpicker colors: true
The optional colors: true setting uses that Kirby Color Palette plugin.
Falls back to Kirby's default color picker if not installed.
Omit it if you don't need color selection.
Read the entries in a template with toAnchorArray(). Each entry has label, anchor (for example, #about) and color properties:
$entries = $page->anchorNavigation()->toAnchorArray();
License
MIT License Copyright © 2026 André Kelling