Profile page variables

Hi,
I made a login based profile pages in my site. The users which register can collect (add) the website content data in their profile pages. In this case I don’t know how to do it :). Is there any documentation or suggestions with that? how can I manage the “grav.user” data or any of the variables and write them into yaml user data. thanks

The user adds this data when registering, or once logged in there’s a form to do that?

Which kind of data does a user enter?

this website hadipisir.com i like to add the recipes which users like to add their profile page :wink:

@favio any sugesstions?

You need

  1. create a form that will only be shown to logged in users (using the Login Plugin)

  2. upon form submission, store this data in the user/data/recipes/ folder, one YAML file for each user. You can see how the Comments plugin achieves this same operation using the onFormProcessed event in https://github.com/getgrav/grav-plugin-comments/blob/develop/comments.php#L178-L245.

The only difference is that Comments has one YAML file for each page, but you’d rather have one per each user

  1. in your plugin, expose a “recipes” variable using Twig. Example of how Comments does: https://github.com/getgrav/grav-plugin-comments/blob/develop/comments.php#L75-L78

thanks a lot @flavio :vulcan_salute: