Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » class UserAndAPageAtTheSameTime

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1080 Views
  • Nathan Cox
    Avatar
    Community Member
    99 Posts

    class UserAndAPageAtTheSameTime Link to this post

    Hi, I was hoping for a bit of wisdom about a problem I'm having...

    The site I'm making has Client objects that extend Page since their main role on the site is to show a page with the client's information on it. The thing is, the clients also need to be able to log in and edit their page themselves, so we need a Client member type. I don't want the site admins to have to create two objects each time they add a client, so I was wondering about the best way to do this:

    Should I just make them Member objects and create a controller or something to display their data (although I'd really like the URLs to just be /user-name)?
    Or is it good and do-able to have two separate objects and make the ClientPage create a ClientUser automatically when it's created?

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: class UserAndAPageAtTheSameTime Link to this post

    I would probably create a controller to display members.

    www.site.com/member/(username) or something.

    1080 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.