Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.
Bruno Meilick edited this page Mar 4, 2020 · 1 revision

Kirby does not have a persistent unique id for Page- and File-Objects, which could be useful in various situations. Using the $page->id() will not solve this since it changes when the $page->slug() / $page->url() changes, Files could get renamed. What would be needed was a Field defined in Page/File Blueprints where that unique id will be stored and some logic to generate it automatically (using Hooks). Thus the idea of autoid was born.

To sum it up with the AutoID Plugin you can solve problems like these:

  • Automatically get an unique id for each Page/File which has the autoid Field in its Blueprint.
  • Store a reference to a Page/File which does not break if that objects or parents are renamed.
  • Get a Page/File quickly using that reference.
Clone this wiki locally