Does anyone have any pointers on creating blog posts via API/usercontrol? I have a site I want users to be able to log in (not back end) and write their own blogs. I've set up allowing them to create other doctypes,,, but not blog. Is it done the same way (DocumentType dt = DocumentType.GetByAlias("BlogPost")) or is it more complicated than that... Which dlls and libraries do I need? Does it magically create the date-folders for me?
Unless you've installed some sort of package for your blog, you should be creating the whole structure yourself. Structure is important here :-) My structure normally looks like this (for a news archieve as an example:
- News
- News article
- Comments
- Date folder
- Comment
So when the first comment is created, I'm creating the Comments folder, Date folder and the comment itself. Of course I am doing a check if these are created so I won't end up with duplicate nodes in the backend.
Another thing to consider is the amount of nodes that will be created over time. If you end up with 500 nodes every week, I think it would be worth considering a custom database or custom tables in the Umbraco database for this. Reason being that the content tree *can* be slow when containing a huge amount of nodes (we're talking thousands here)
Thanks for the reply,,, I wasn't sure if the blog4umbraco package allowed you to create blog post via API... It's a fairly simple blog structure I'm after so I just built it myself (don't need datefolders etc).
I would be using Blog4Umbraco or Ublogsy and you could create multiple blogs for each person and have them use the word document approaching for each person and based on thier login give them persmission on only their blog node. You could also do this via the API but seems like a lot of work which is already there in the word.
Creating blog post via API
Hi,
Does anyone have any pointers on creating blog posts via API/usercontrol? I have a site I want users to be able to log in (not back end) and write their own blogs. I've set up allowing them to create other doctypes,,, but not blog. Is it done the same way (DocumentType dt = DocumentType.GetByAlias("BlogPost")) or is it more complicated than that... Which dlls and libraries do I need? Does it magically create the date-folders for me?
So many questions!
Cheers,
Paul
Hi Paul,
Unless you've installed some sort of package for your blog, you should be creating the whole structure yourself. Structure is important here :-) My structure normally looks like this (for a news archieve as an example:
- News
- News article
- Comments
- Date folder
- Comment
So when the first comment is created, I'm creating the Comments folder, Date folder and the comment itself. Of course I am doing a check if these are created so I won't end up with duplicate nodes in the backend.
Another thing to consider is the amount of nodes that will be created over time. If you end up with 500 nodes every week, I think it would be worth considering a custom database or custom tables in the Umbraco database for this. Reason being that the content tree *can* be slow when containing a huge amount of nodes (we're talking thousands here)
Hope it makes sense.
All the best,
Bo
Thanks for the reply,,, I wasn't sure if the blog4umbraco package allowed you to create blog post via API... It's a fairly simple blog structure I'm after so I just built it myself (don't need datefolders etc).
Cheers,
I would be using Blog4Umbraco or Ublogsy and you could create multiple blogs for each person and have them use the word document approaching for each person and based on thier login give them persmission on only their blog node. You could also do this via the API but seems like a lot of work which is already there in the word.
Just my 2 cents...
S
is working on a reply...