Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Nov 21, 2010 @ 21:35
    Bo Damgaard Mortensen
    0

    Extending 'Create Member' - best practice

    Hello fellow Umbraco devs,

    I'm currently building a site where you, as a member, are able to create your own advertising spots which will be randomly exposed on the site.

    Thing is, that you have to apply to the admins (by phone or e-mail, seperate from the umbraco site) to be registered on the site as an advetisor/member. So basically all the registration is handled by the site admins.

    What I've been thinking about is, how to structure this problem and I've come up with an idea similar to this:

    So, as you can see, each member will have their spots in their own folder. However, I want the registration of the members to be as simple as possible for the administrator(s) to handle. As I see it, it would be a 3-step process to add a new member:

    1. Add the member in the members section
    2. Add the members folder ind "Member spots" in the content tree
    3. Set the public access to the members folder
    I was thinking about making a usercontrol that does all these three steps at once and maybe put it on the dashboard, but I don't know if that would be the best way to solve this problem? Or maybe I've overlooked something that would make this way easier ;)
    Any input on this would be greatly appreciated! If the problem is unclear, please let me know and I will try to elaborate!
    All the best,
    Bo

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 21, 2010 @ 22:32
    Jan Skovgaard
    0

    Hi Bo

    So if I understand this correctly you need the advertising root node to be created once the new member is created, right? And then the site admins can create some spots beneath each advertiser afterwards?

    That should be fairly easy to achieve by using something like the Member event "AfterSave", where you can then create the root node using the api and apply the correct permissions.

    So all in all I think your approach seems like a good way to do it.

    /Jan

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Nov 22, 2010 @ 08:37
    Bo Damgaard Mortensen
    0

    Hi Jan, 

    and thanks for tuning in! :-)

    I honestly didn't know about the AfterSave event, I'll look into that! Thanks a lot. I just want the root node i.e. "Bo Mortensen" in my picture example above to be created when the member is created. The members can then create/update/delete the advertising spots themselves as they want to from the site itself. The "only" action taken from the admins is to create the member, root node and set the appropriate access for the root node. That's the task that I wanted to simplify.

    I think I'll write my own user control to do it all at once and place it on the dashboard, if possible. Any other suggestions where to place it is more than welcome ;-)

    Thanks again!

    Bo

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Nov 23, 2010 @ 09:24
    Bo Damgaard Mortensen
    0

    So far so good! I've got my usercontrol working on the dashboard, but I have a question or two about it:

    1. Is there any way to prevent the new nodes from appearing twice in the content tree when created?
    2. In the dashboard.config file you would think that you could add a new area for the Members section like this: <area>members</area>, but this is not working - it dosn't show up. Does anyone know what the area name for members is? :)
    Thanks in advance!
    Bo

Please Sign in or register to post replies

Write your reply to:

Draft