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?
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!
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
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
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
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
is working on a reply...