show only content for that member

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
DonnaNJ
Forum Members
Forum Members
Posts: 40
Joined: Mon Nov 19, 2007 6:08 pm

show only content for that member

Post by DonnaNJ »

I'm creating a member only area where client can go in and create a profile - and then fill out a questionnaire. (may be more than only form for each user).

Then visitors can search information and pull back all the details if they are interested.

However - I want the client to go in and be able to edit /change or delete their questionnaire.  So after they log in and want them to only see their questionnairs - and be able to edit them - but not anyone elses.

I know how to create member areas with FEU and Custom Content... but how do I make the customcontent show only the logged in users forms ?

So each Content page will be different based on the login - but I don't want 100's of pages ?

I hope this is clear - but it's hard to describe.

thanks

DonnaNJ
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: show only content for that member

Post by jmcgin51 »

I don't know what you're using to generate the form(s), but let's say you're using a CMSMS module.  Your logic would look something like this:

IF user is logged in and authorized to see this content
  {cms_module module="whatever" form="profile_for_$ccuser->username()"
ELSE
  sorry, you can't see this
END IF

Your forms, then, will need to be named according to the username of the user (i.e. "profile_for_user1")

BTW, I'm sure the code above is not syntactically correct.  It's just to get you started with the logic.

There are probably other ways to do this; this is just the one that came to mind first.
Post Reply

Return to “CMSMS Core”