Hello,
I’m using Kirby to create a locations database for the video production company I work for. The title of a location page can be the name of the location (Sometown Airport Terminal A) or an address in case of a private house (1234, Somestreet).
The problem is that whenever I enter an address, the Panel considers the the door number as the order number. So if I create a page names “1234 Somestreet”, it will create a “somestreet” folder.
The problem is that if I want to add another location at 4321 Somestreet, the panel tells me that the UID is already used.
Using zeros for numbering posts dosen’t make a difference. Using the date is a little bit better, but if I want to enter two locations on the same street on the same day, I will have the same problem as before.
I see 2 solutions that could work for me :
- A fix that prevents the panel to use the numbers at the beginning of a title as order numbers
- A way to use a random string for the slug (note : it’s an internal tool, I couldn’t care less about SEO or pretty urls)
Any ideas ?
Thanks a lot!
Felix
P.S.: I loooove kirby. Seriously.
That’s actually a know issue, or rather, it is how Kirby is designed to work, see this issue on GitHub
Currently you would have to manually change the slug.
You could also use a hook to change the slug, with the downside that you will run into an error in the panel because the page will no longer be valid.
I am facing the same issue. Is there a working work around to use to be able to start titles with a number?
Thanks in advance!
In Kirby 3 you can start titles with a number, because the dash that separated the sorting number from the uid has been replaced with an underscore.
I have the same issue. Pls write more widely about solving it. Thank in advance. It would be great to understand how to solve it
Best option: Update to Kirby 3
There are no good options to solve this for Kirby 2, only these:
- when creating a page via the Panel, remove the number from the slug while keeping it in the title
- change the dash that separates number and title in the automatically created slug to an underscore, so you get a page slug like this `100_things-you-always-wanted-to-change…"
- when creating pages manually (outside of the Panel), you can create page slugs like this
2-100-things-you-always-wanted-to-change-in-your-life
. This only works with manually created pages as long as you do no remove the sorting number. In this case it is best not to use Panel for editing at all