Is it possible to have a pages section within a structured field which lets a panel user create a subpage instead of just choosing from an existing set of pages?
My use case is:
on an overview page there are thumbnails referring to an according subpage (front end). However the panel user wants to not only list the subpages thumbnails but also sprinkle the overview with simple text-“fields”. And of course wants to have the option of ordering those subpages thumbnails and text-“fields”.
My current approach is that those text-“fields” are actually also subpages but just with a simple textarea instead of a thumbnail etc. In the panel subpages overview I pulled the textarea’s content and put it into the info, so that the panel user can at least have a “preview”.
My question is, is it somehow possible to have a pages section within a structured field which lets a panel user create a subpage instead of just choosing from an existing set of pages? Because in a structured field the user would then be able to decide whether to create a whole subpage or just a text-“field” and also be able to order those, which is actually the most important thing.
Thx!
I attached screenshots showing the structured field which lets a panel user choose between a text-“field” and ideally a subpage.
Although I’m not quite following you (an example would be helpful), the simple answer to your question is: No. You can’t put a section inside a field. And the pages field currently has no option to create a new page.
This would kind of be the website wip.
There are thumbnails of photo projects which link to a project-subpage with more details of the according photo project. The panel user wants to be able to sprinkle some quotes (the yellow blocks) inside the thumbnails overview. And in the panel order them.
Maybe it’s a bit weird for the panel user, because he/she would have to enter a title and a slug in the subpage-creation-modal window for an entry that actually has no title because it’s a simple textfield. That could be a bit confusing.
Hm, I’m not so sure the structure solution would actually work better.
In any case, you would have to code a custom solution, either a create option to create a page from the structure field (don’t know if the Janitor plugin could be useful here), or a custom add form that would allow users to skip filling in a title.