So to my question. When creating a new page, we have the URL appendix field which get auto filled and turns the URL friendly format, such as my-awesome-page-url. Is there an easy way to achieve this in a blueprint, in some way like the example above?
I’ve never used the panel hooks, only read about it briefly.
I’m guessing you suggest using panel.page.create (and maybe even panel.page.update?) to add/update the UID in the field?
Is there a “proper” field type for this? I guess I could use the hidden one, but I would still like it to be editable in case the title of the page goes out of control, so you can still keep the “hashed” URL somewhat pretty.
That’s true, I just wonder what the purpose of the field is supposed to be? Does it need to be changed if the uid of the field is changed or not? Or should it be static?
Yes, now that I think it through a bit more, it makes sense to only have on the panel.page.create.
Just as long as you are able to change it, if needed of course. Just using $page->uid() for this kind of thing would definitely work, however in my particular case it’s not quite cutting it.
In all honesty, I might be quite anal about this, but having something like my-url.com/whatever#this-is-the-original-title-for-the-section-and-is-quite-long is “unfortunately” a possibility. So yes, the UID only could (and would) most definately work in most cases, however, in this instance I want to save myself some trouble and actually have it editable.
If I’ve understood correctly, you want to display several subpages as sections on a single page. If you don’t need a separate url you can simply change the url after page creation.