for a site for a club I set up some private pages that are only available for logged-in users.
Now I want to extend the user profile with further Information, that the users can give during registration or editing their profile.
I wonder where these data should be stored. First approach is to extend the login.yaml, profile.md and register.md with some extra fields.
But I am not sure, wether this would be the right way as I want to make these Infomations available for other users.
e.g. the user adds some informations about his sailing boat (it is a sailing club) and i want to show a table where I list all boat informations of all users.
- Will these information be accessable within my twigs?
- would it be possible to add some pictures to the profile?
since the account is just one .yaml file and also includes some private data, my first idea does not seem to be a recommended way to solve this.
What would be the best way?
Thank you for any hints
perhaps i failed to explain what i am looking for.
i want to create a list of the boats our members own - with some Infos the member give optionally.
Since the member should be able to maintain his infos on his own, i thought about extending the .yaml
I found out how to do this using the login-plugin.
but i don’t know how to access these fields from within my twig-files.
This would work for me as a first approach.
for the future it might happen, that i all so have to store further files per member.
so - if there is a solution for something like home directories for users, it might be better to skip the step with the extended .yaml.
To use data from users account files you could use the Snitch Plugin.
Another approach is to let each member create and maintain their own “Me and my boat(s)”-page. For that you may find some of my other Grav Plugins helpful.
thank you for the link!
For now i expanded the users-profiles fieldlist and let them edit the infos, they want to be mentioned.
On submitting the form a mail will be send to me in cc with all fields - i still have to copy those to the boat’s page (won’t be too many ;-))
I will have a closer look to your plugin, as soon as my schedules allows.