When I create a page in the panel with a name that starts with a number and is followed by a - or a character that is changed to a - (for example â100.1 testâ):
Then the url appendix dialog says â101-1-testâ which is correct.
But when I click on âAddâ, the created slug is â1-testâ.
When I click back to the parent, I see that is has been given an index of 101. But I never meant to give it an index and I wouldnât expect the add page dialog to do this.
Is this a bug in panel or am I doing something wrong?
Well, page slugs may not start with a number, because numbers are reserved for visibility purposes in Kirby. If you have to use a title that starts with a number, you have to make sure that the number is not part of the UID.
Isnât it strange that the panelâs add page feature is first reporting the url appendix in the correct way and is then changing it afterwards? Feels like a bug to meâŚ
Shouldnât it then report an error instead, when adding the page? âUIDâs may not start with a numberâ
I am not working with page visibility⌠In my project, I assume all pages to be âvisibleâ. And I really want to avoid having every page directory having a number in frontâŚ
Actually, if the first â-â would be swallowed by kirbyâs slug system, we could add a - in front when the page name starts with a number and donât want it to be used as visibility index⌠and it would still start out invisible
â-101.1 testâ would generate slug: â101-1-testâ
I will probably implement this on my side as a hook.
That gives me another error actually⌠and I am confused why I would need to create a new page after calling $page->move() in the first place⌠doesnât it update these things internally when calling move?
Anyway, I am calling a day on this⌠Will try to figure out a cleaner way of dealing with this number issue another time. Thanks for helping!