Copied to clipboard

Flag this post as spam?

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


  • Proxicode 128 posts 324 karma points
    Aug 08, 2013 @ 22:05
    Proxicode
    0

    Automatically create children?

    Hello,

    Hopefully I've put this in the right group. I have a site which list the chapters of a particular group by the US state. I am trying to give the Umbraco admin user the ability to create a new "Group Page" docType under the existing state, and with the creation of that one page, 3 children also of type "Group Page" would be created.

    So for example in the CMS, I right click on Colorado, add new page called "Denver Group", set it's properties normally, and then on either save or publish I would get this ideally.

    Colorado
    --Denver Group  (/denver-group)
    ----About Group (/denver-group/about-group)
    ----Our Members (/denver-group/our-members)
    ----Our Speakers(/denver-group/our-speakers)
    

    I started looking into events but before I get too deep, I hoped you all could point me in a particular direction.

    Any help, ideas, suggestions are appreciated :)

    Thanks -Roger

  • Andy Butland 422 posts 2334 karma points MVP 4x hq c-trib
    Aug 08, 2013 @ 22:39
    Andy Butland
    0

    Assuming version 6, this is probably the best place to start looking for details of events - and it sounds like it's the ContentService SavedEvent you want. You register your event on application start-up.   Within that event you'd then need to look at the content service for writing the code to check the doc type you have created, and if it's the right one, create the three child nodes.

    If version 4 there are other methods to allow you to do the same thing you can read about on the same documentation site.

    Hope that gets you started.

    Andy

  • Proxicode 128 posts 324 karma points
    Aug 09, 2013 @ 00:19
    Proxicode
    0

    Thank you for the pointers and the links. SO this is a stupid question, but I assume the only way to work with Events in this way is through a new compiled dll that I would create/add, Or by working with Umbraco as VS project?

    Thanks again! -Roger

  • Andy Butland 422 posts 2334 karma points MVP 4x hq c-trib
    Aug 09, 2013 @ 22:03
    Andy Butland
    0

    Yes, that's the case.  There's no UI for events in the back office, you'd need to write code to do what you require.

Please Sign in or register to post replies

Write your reply to:

Draft