Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Retrieve blog post data based on blogID View modes: 
User avatar
Member
Member
mukesh.laxkar-octalsoftware - 3/14/2012 12:08:31 AM
   
Retrieve blog post data based on blogID
Hi,

I want to retrieve blog post data based on blogID , but i don't reletionship between Blog & blog post and i am unable to make sql query to retrieve blog post data via blogID .
please reply with query.....

thanks

User avatar
Member
Member
kentico_michal - 3/20/2012 6:40:02 AM
   
RE:Retrieve blog post data based on blogID
Hello,

The only relationship between blog and blog post documents is that the blog document is one of the parent documents of the blog post document. If there is a need for the blog document, Kentico CMS goes through all parent documents and tests if the current document is blog. I would recommend that you execute the following method:

CMS.Blogs.BlogHelper.GetParentBlog(int documentId, bool selectOnlyPublished)

and enable the SQL debug to see what query gets executed by this method: SQL queries debugging.

Best regards,
Michal Legen