Folder structure for customized numeric sorting

This is totally a minor issue, but is there a way to customize how the panel names folders using the default sorting?

Here’s what I mean—currently the page blueprint is set to default numbering which gives me:

stories
  1_story-one
  2_story-two
  3_story-three

Great. But what I’d love to do is add a leading zero (or 2) and a letter prefix to each, so something like:

stories
  AB001_story-one
  AB002_story-two
  AB003_story-three

Is this doable without too much fuss?

I don’t think so, because the numbering scheme has effects on multiple methods (changeSort(), changeStatus()), which require an integer as input value.

May I ask why you want to do that, given that nobody will ever see those prefixes?

Thanks for the quick response, Sonja. It’s really just me being a fussy perfectionist and not a big deal AT ALL.

Would I be able to echo a page’s sorting number into a theme for the front-end, though?

Sure, all you’d have to do is add the prefix and fill up the zeros depending on number.

https://www.php.net/manual/en/function.str-pad.php

Using your example, that would be:

<?= str_pad($page->num(), 5, 'AB000', STR_PAD_LEFT) ?>

If you expect to have more than 999 pages, you would have to adapt the total length and the prefix.

Perfect. Thanks again!