0

Having used EE in fairly conventional ways, I'm not sure how to build this. Here’s the scenario:

  • A user registers and uses the site to create and view ongoing health data, graphs and statistics etc.
  • This is sensitive data so, like a running app site or myFitnessPal only the user (or other selected members of the community) get to see their pages.
  • The template for each user’s set of pages is the same but the data will be personal to the user.
  • A trainer will need access to 15 users.

How can ExpressionEngine enable this?

  • 1
    This is a pretty broad question! What have you considered already? What specific challenge are you looking to overcome? – Derek Hogue Mar 27 '17 at 12:44
  • I think I've implied that ... the conventional way to use EE is, for example, to publish a series of channel entries that are viewable to everyone. Or possibly a number of channels + entries that are viewable to sub-groups. I've built about ten sites this way. What I don't know at all is how to build a site where each individual user provides the content and gets effectively their own site. Like a running app site (gives you your own stats) or myFitnessPal (gives you your own ongoing diary of food + exercise). I'm presuming that EE can't do this. Was never meant to do anything like this. – Bruce S Mar 27 '17 at 16:20
2

It's defiantly doable. The tricky part will be allowing other users to 'manage' some people.

I'd probably look at something like Zoo Visitor (EE2) as it saves users 'profile' to channel entries which does come in handy.

A user signs up where it creates a new user (you will likely have to use email address as the unique member identifier).

After signup, redirect to "/update" (or whatever URL) which is a 'channel form' some things will have to be pre-formatted (title, url_title etc but you'll never use most) here they can enter their "stats". Saving this page will make that member the "author" and once they're the author you can restrict viewing it to that author.

{exp:channel:entries author_id="CURRENT_USER"...}

This will take care of users being able to only see their stats.

For "trainers" you're going to have to manually assign them to entries by using a relationship field - a custom field that is added to the members channel that links to a specific 'trainer'. then you can have a url like "/trainer/manage" where you can search the members channel for the currently logged in 'trainer' - not trivial but do-able. This would return a list of members assigned to the logged in trainer where the could click on each member like "/trainer/edit/ID_of_chosen_member".

This is all overly broad but so to is the question. You have yet to declare what data will they be managing, how is the data updated, is the data to be historical… if so you will need multiple entries – you will want to use a separate channel specifically for this purpose.

I've done similar before, you do have to compromise on some things and re-arrange others. For 'getting' data you're best to use member ID's and plan, build, re-configure, plan, build. From memory, I used Stash a helluva lot, as it was easier to capture a bunch of data and filter it dependant on the logged in user.

There is no right or wrong just try and try again.

| improve this answer | |
  • Ok. That was the point-in-the-right-direction I was hoping for. – Bruce S Mar 28 '17 at 8:07
  • 1
    @BruceS perhaps you should give him an upvote then? – AllInOne Mar 28 '17 at 13:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.