Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > How is the blog post automatially stored inside the right folder? View modes: 
User avatar
Certified Developer v7
Certified  Developer v7
kenticonewbie - 5/6/2009 12:40:30 PM
   
How is the blog post automatially stored inside the right folder?
We are developing a submission application with similar functionality as how the Blog does now. The application allows users to create a story (similar to creating a bog), and then post related media files (similar to add a blog post) from the live site. Ideally, we want to store the media files as child items of the relative story. Just like the blog posts could be organized by post Month. What's the trick of doing this? Is a BlogMonth document type item automatically generated if there is no month folder for the blog post?

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 5/18/2009 4:22:51 AM
   
RE:How is the blog post automatially stored inside the right folder?
Hello,

Yes, the BlogMonth is automatically created if there is no month folder for the blog post. You can find code that ensures this behavior in ~\CMSDesk\Content\edit.aspx.cs file in your project folder. It starts with following part of code (line 435 by default):

// Special treatment for blog post (ensure parent month)
if (newdocument && (ci != null) && (ci.ClassName.ToLower() == "cms.blogpost"))
{
...

Best Regards,

Martin Dobsicek