Question about page uid

I would like to use unique id strings for pages. My question is whether every autogenerated $page->uid() is unique?

Thank you in advance!

No, the slug is only unique for each child of a given parent, while subpages of different parents can have the same slug/uid.



So the uid/slug of both of these subpages would be my-awesome-subpage.

1 Like

Immutable IDs are planned (Immutable IDs for pages ยท Kirby Feedback).
For now you can use this plugin to generate Unique IDs: GitHub - bnomei/kirby3-autoid: Automatic unique ID for Pages, Files and Structures including performant helpers to retrieve them. Bonus: Tiny-URL.

1 Like

Thank you for your replies, very helpful!