Retrive Posts of Blog
IQueryable
<BlogPost> allPosts =
.BlogPosts()
.Where(bP => bP.Parent.Title == "BlogName" && bP.Status ==
ContentLifecycleStatus.Live)
.Get();
Hello Anu,
I executed the code you pasted without problems. Do you use the latest version of Sitefinity? The error shows that the query to the database is not valid which might be a result of passing wrong data in the query.
Can you replicate this issue on a new installation?
Regards,
Ivan Dimitrov
the Telerik team
Hello Admin,
im using Sitefinity 4.0.1210.0 version ... i have fired following Query
BlogsManager
manager = BlogsManager.GetManager();
IQueryable<BlogPost> allPosts = manager.GetBlogPosts()
.Where(p => p.Parent.Title == "SEM").Where(s => s.Status == ContentLifecycleStatus.Live);
Hi Anu,
Please upgrade to the latest official release which is 4.1 1501 and let me know whether you experience problems. You can also install a new project with the project manager which will take no more than 1 minute and execute the same code to see if there will be any progress.
Regards,
Ivan Dimitrov
the Telerik team
Hello Admin,
BlogsManager
manager = BlogsManager.GetManager();
BlogPost allPosts = manager.GetBlogPost(guid);
from the above query how to retrive Value of Custom Fields from allPosts ?
I have added "Meta_Description" Custom Field in Blog Post n i want to retrive its value.
Please tel me.
Thanks and Regards
Anu.
Hi Anu,
Here is a sample
allPosts. GetValue("name of your field);
GetValue is a method of DataExtensions class, so please add reference to it.
Best wishes,
Ivan Dimitrov
the Telerik team
Hello Admin,
Thanks a lot ... tht solved my issue ... :)