Blog entry Titles prefilled with date

I’m building a little updates portion of the site for my farmer client. I’m putting a little area for them to put updates, i want to keep it simple and not require anymore info then needed. So i wanted to make the titles the dates instead of using an actual title. Has anyone a solution to let me do this? If not then i can help the customer in coming up with update titles.

Maybe you could use a structure field for the updates instead of subpages?
This way you don’t need titles at all and would provide a textarea and a date field within the structure.

I attempted that lol, then you lose native pagination though.

Thats true…
I don’t think, using a date field for the title is valid… or even possible. :frowning:

No, that doesn’t work, just tested it. How about using the idea of the structure fields and then create a new page from each of the entries automatically?

You could write a panel widget with a date and textarea field that would auto create a new subpage.

I Have zero clue how to do something like that :expressionless:

Every URI (Uniform resource identifier, $page->uri()) of all pages within a content-subdirectory has to be unique.
Otherwise, only one of the pages with the same URI-name (that is the name of the directory of the page without the leading number oder date) is displayed.

As far as I know, adding panel widgets currently can only be done by manipulating the source code. But hopefully, there will soon be a possibility to extend the panel like that, @bastianallgeier?

As regards creating pages from structured fields, you can use $pages->create() and $page->update()which makes it fairly straightforward.

I would set up an invisible update page with the structured fields and then have a controller/template which creates those new pages in subfolders. The template for this page then pulls in the generated children.

The downside of this approach is, that you can’t really use kirbytags properly in structured fields, but if that is not a requirement … it might work.