tearoom1/kirby-block-reference

Kirby plugin to reference blocks in other pages

Maintainers

Package info

github.com/tearoom1/kirby-block-reference

Documentation

Type:kirby-plugin

pkg:composer/tearoom1/kirby-block-reference

Fund package maintenance!

tearoom1

Buy Me A Coffee

Statistics

Installs: 49

Dependents: 0

Suggesters: 0

Stars: 9

Open Issues: 0

1.0.9 2026-06-10 10:25 UTC

This package is auto-updated.

Last update: 2026-06-10 10:25:42 UTC


README

This plugin allows you to reference other blocks. Thus, you can easily repeat a block in multiple places on your page while being able to update it in one central place.

Getting started

Use one of the following methods to install & use tearoom1/kirby-block-reference:

Git submodule

If you know your way around Git, you can download this plugin as a submodule:

git submodule add https://github.com/tearoom1/kirby-block-reference.git site/plugins/kirby-block-reference

Composer

composer require tearoom1/kirby-block-reference

Clone or download

  1. Clone or download this repository from github: https://github.com/tearoom1/kirby-block-reference.git
  2. Unzip / Move the folder to site/plugins.

Usage

Use the block by adding it to you blueprints fieldsets if they are defined:

fieldsets:
  - reference

Access Control

The plugin exposes two API routes that the panel block UI uses to look up reference targets: getAllPages (list page IDs) and blocks (return the blocks of a given page, including drafts). Both routes require a logged-in panel user; they return 401 Unauthorized for anonymous callers.

By default, only admins can use the reference picker. Non-admin roles can be allowed explicitly:

// site/config/config.php
'tearoom1.kirby-block-reference.allowedRoles' => [
    'editor',
],

The page picker and API routes also check Kirby's page read permission for every target page. Users only see pages they are allowed to read.

License

This plugin is licensed under the MIT License

Credits

  • Developed by Mathis Koblin

"Buy Me A Coffee"