Copied to clipboard

Flag this post as spam?

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


  • James Woodley 9 posts 29 karma points
    Mar 30, 2010 @ 14:38
    James Woodley
    0

    Blog4Umbraco API?

    Hi all,

    Can someone point me in the right direction for a way of creating BlogPosts automatically for a Member? I can create a Member perfectly fine, but I need to create a default Blog Post for them at the same time..is there a "Blog4Umbraco.CreatePost" method I can use somewhere or similar?

    Regards
    James Woodley

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Mar 30, 2010 @ 14:50
    Jan Skovgaard
    0

    Hi James

    If I understand correctly I think you should be able to achive your goal using events.

    I would use the "AfterSave" event and then create the specific document type afterwards.

    You can see the different events here: http://our.umbraco.org/forum/developers/api-questions/8214-Blog4Umbraco-API- and see som good examples of the usage here: http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/event-examples

    Hope this points you in the right direction.

    /Jan

  • James Woodley 9 posts 29 karma points
    Mar 30, 2010 @ 15:59
    James Woodley
    0

    Hi Jan,

    Thanks for that, but what I need is some syntax, or the point toward some syntax to actually create the Blog Post? It needs to be done all in code behind!

    /James

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Mar 30, 2010 @ 16:41
    Jan Skovgaard
    0

    Hi James

    Sorry - I Forgot to post a link to the API cheatsheet about document creation: http://our.umbraco.org/wiki/reference/api-cheatsheet/creating-a-document

    When your event occurs you can use much of the code presented on this page to create the blogposts.

    /Jan

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies