I have created virtual user pages on my website. I use these user pages to display information about users in the frontend.
Since this is a website with users from several countries, I use these virtual user pages also in the backend, to display the users from these different countries exclusively to their respective „country editors“ (with pages sections filtered by country).
What I have not yet been able to do is, to allow the country editors to edit the data of the users from their country. I can display the data of the individual user pages with the same fields blueprint as the users
https://my.website/panel/pages/intern+members+ZQ5abtQD (URL virtual user page)
https://my.website/panel/users/ZQ5abtQD (URL user profile)
However, when I edit the user data and try to save them, these changes are not saved.
I also had a route in mind, to forward the country editor from the virtual user page to the user profile and do the changes there.
[
'pattern' => 'panel/pages/intern+members+(:alphanum)',
'action' => function ($alphanum) {
return go('panel/users/$alphanum');
}
],
But that doesn’t work.
I probably have to do as described in the recipe “Virtual content from a database.”
and replace the WriteContent() statement in a page model for user pages. However, I read in this forum thread that the WriteContent() statement is deprecated in Kirby 5.
I´m a little bit stuck now. Has anybody an idea, how to proceed?
Thanks in advance
Thomas