[PHP] - Dynamic page content, tied to user accounts


I’ve recently created some word-press websites and become increasingly interested in the Grav CMS. My aim is to build a site that people can post information thats saved on the page, which they can come back to later. Heres a step by step breakdown of what I’m looking to acheive, against what I know so far.

As a new learner, I’d appreciate it very much if anyone was willing to help me find the answers.

  1. First, I’m looking to create a page that users have to log in to view.

This part seems easy - thanks to the front matter access. -solved.

  1. Once logged in, I want users to be able to type in a simple form field, saving that data on the page. And tieing it to their account so that they can come back and see that posted information later.

This parts currently quite hazy to me, I’m guessing that I need to use php to save objects to the users yaml file. Then call those objects in the field.

  1. If I get that far, it would be nice to be able to tie child strings to that posted data, so the user can click on the post in number 2, and see three related posts or breakdowns.

Mostly, I just want to know if this is possible on Grav and if I’m thinking about it the right way (but I’d be thankful for any input, small or large that points me in the right direction).

Pretty much anything is possible in Grav. Although what you are asking is going to require a custom plugin to achieve because Grav doesn’t have anything like this capability built in. Same goes for WordPress and developing for Grav would be a simpler process compared to WordPress however.