Hello
I’ve been toiling over this for a few weeks and haven’t got anywhere yet.
My idea is that I want to create a handful of pages, but I want the content displayed on each page to be determined by which user is logged in.
I don’t mean selecting a chunk based on a user group or user ID. I mean something more like how facebook has one page for "profile" and one page for "notes" etc., rather than having a document created for each user account!
Here’s what I want to display, after checking the user ID of the user logged on:
- User’s own gallery, populated with images from a directory named after the user
- User’s personal files, populated with files from a directory named after the user, with ability to upload their own files
- User notices (specific to a user) populated from a separate database table.
To summarise, I don’t want to have to store a page for each user I create. In my mind, this would lead to a messy and unmanageable navigation.
My questions:
1. Does anyone use modx like this? It seems normal to me.
2. Can someone recommend any existing snippets that already do the above three things? Or perhaps the best snippets for me to start to modify? For example I have been thinking of finding a gallery that allows me to set the location via a variable in a snippet, and setting that variable to the user’s ID. Likewise a snippet that displays files in a directory where I can set the directory name to the user’s ID.
3. I am using WebLoginPE with custom fields to store info about each user, such as the current status of their order. This will then allow me to build a snippet that outputs a chunk depending on where they are in the order process. What if I want to create more tables, e.g. so that a user can post a message to his account (ala Facebook)? Can Jot be used on a per-user basis like this? Any other ideas? Are there any good resources / walkthroughs / guides?
Thanks!
Mat