Kill the current menu system

Could an (optional) safe prefix character for folder names be a relatively simple solution?

For example, lets use the underscore _ as prefix character.

This character must always get stripped from the visible output slug by Kirby (when it’s at the beginning of the string).

  • folder: this-is-a-pageslug: this-is-a-page
  • folder: _this-is-a-pageslug: this-is-a-page

This should be fully backward compatible.

It should be easy to use the prefix character as a separator to separate sorting numbers from numbers in the title or slug.

Invisible page:

  • folder: _1995-2015-greatest-hitsslug: 1995-2015-greatest-hits

Visible page:

  • folder: 10-_1995-2015-greatest-hitsslug: 1995-2015-greatest-hits

When using the panel

When entering a new page title or URL-appendix starting with a number, Kirby could automatically generate folders with the prefixing separater character.

For the panel user title and URL-appendix still looks as expected:

No strange separater character visible.

Am I missing something?

1 Like

If I understood correctly, that’s the current proposal (I’m all for it as well). As @cilice pointed out, it touches Kirbys core UID functions that have to be adapted likewise though.

Hi all -
Does anyone know if there has been a resolution to this issue?
I’m trying to create a page with the following slug:
7-songs-in-12-colors
…and have my folder name set to the above. When I view the entry in the panel however, the slug becomes songs-in-12-colors.

Any ideas as to how one might work around this?

Thanks

This is not possible, page slugs with a number are regarded as visible pages. You would need a letter in front of the number.

It’s not possible out of the box, but you can create a route for that page. But be aware, if you create many pages like it, the route/routes would probably end up being a mess.

This can only be done by a developer, not by a user though.

I did find a solution, though it feels a bit hack-y – if you add a second number to the slug (eg 7-7-songs-in-12-colors) it seems to work. Going to use that for now, thank you for the suggestions!

That’s a bit dangerous, because if you try to make the page invisible, it will still be visible and you will get a page not found error in the panel.

So you should at least prevent changing of visibility status for such pages.