Jump to content

Users, events, registrations: how to structure data model?


isellsoap
 Share

Recommended Posts

I have the following page structure in my PW installation:

  • Projects
    • Project A
      • Project phase 1
        • Event 1
        • Event 2
      • Project phase 2

A PW user should have the ability to "sign up" to a project, the project phases and the events. So a user can "sign up" to, say, "Project A" as a whole, but that doesn’t mean he attends every project phase or event inside the project. He could choose to only attend "Event 2" and not "Event 1" inside of project "Project A". So far the functional aspect.

Now I don’t know exactly how I can accomplish this with ProcessWire. The end result should be that a user with a PW account has an overview of all projects and all its sub-pages in the front-end of the website and he can select the projects, project phases and events inside of the project he/she wants to attend (e.g. by checking checkboxes), hits save and that information (the PW pages he "signed up" to) gets stored in the back-end. How would I store that information data-model-structure-wise? Should I have separate pages for every single registration to an event? But how would I connect that information to the technical PW user in the back-end? 

Any help and suggestion is highly appreciated. Thanks.

Link to comment
Share on other sites

Just short from mobile...

Search the forum (viaGoogle) for structure content kongondo... there is a great topic on this kind of problems.

And search for usage of page fields as connector of your data.

For me at the first impression you have to separate three things.

Projects - can have several phases, users, events

Phases - related to the project connected users and events

Events - related to phases, users and projects

The user template have multiple page selector for projects, phases and events of a user....

Best regards mr-fan

  • Like 2
Link to comment
Share on other sites

Can a user theoretically sign up for a project but not sign up for any phases or events? If not then I suggest that the user only signs up for events, and this implicitly also attaches them to phases and projects by virtue of the page hierarchy above event pages.

Users are pages, so each event has a Page field that stores all the users that have signed up for that event.

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...