You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the create option in a blueprint to customize the create dialog, it's possible to automatically set title and slug values on creation. This process has two unexpected flaws right now:
While it's possible to use gobally defined page methods, it's not possible to access methods defined in the given page model.
Both templates used to generate title and slug values get passed a virtual page with the content set for the new page. The title is generated first but as the slug receives the same virtual page, it does not know about the newly generated title. So it's not possible to generate a slug with the title content in mind which is problematic if the title contains a random component which cannot be replicated without knowing the title (think of any kind of random hash).
Expected behavior
Page methods and models should both work.
The slug template should also receive the newly created value of the title.
The methods licenseKey and licenseSlug do work when defined in a page method.
They do not work if defined in the given page model.
Your setup
Kirby Version
Kirby 4.4.1
Additional context
It would be interesting to be able to set the slug generation to something like true to trigger automatic slug generation from the title. Currently an error is thrown, if no custom template is given. Setting {{ page.title }} does not work because the title is not set on the virtual page yet.
The text was updated successfully, but these errors were encountered:
Description
When using the
create
option in a blueprint to customize the create dialog, it's possible to automatically set title and slug values on creation. This process has two unexpected flaws right now:Expected behavior
To reproduce
Simplified page blueprint:
The methods
licenseKey
andlicenseSlug
do work when defined in a page method.They do not work if defined in the given page model.
Your setup
Kirby Version
Kirby 4.4.1
Additional context
It would be interesting to be able to set the slug generation to something like
true
to trigger automatic slug generation from the title. Currently an error is thrown, if no custom template is given. Setting{{ page.title }}
does not work because the title is not set on the virtual page yet.The text was updated successfully, but these errors were encountered: