Subpage numbering by custom model function

Moin!

I’m trying to create a subpage numbering by date. With a “real” date field, it’s no problem, but here I have a custom calculated date in a model function which should be used as page numbering prefix.

Is this even possible? What date format should my model function return?

I don’t think it’s possible to use a computed date for the numbering prefix. You can though use a page.update.hook (see docs) to calculate this date and persist it to a invisible field, let’s say: _prefix

To make it not visible on the panel, just leave this out of the blueprint.

Next, select that field for numbering on the parent’s blueprint:

pages:
  num:
    mode: date
    field: _prefix
    format: YmdHi # here you choose the format you want

Perfect! This works! Thank you!