Displaying a list of Blog Posts
Hi,
I was having trouble displaying a list of posts from a blog. The problem is that it is displaying only the version of blog post that is live and not necesarily the most recent version (which would be hidden). Basically I am trying to figure out what property to group each post by to get the latest version. Here is a snippet of my code
Dim mostRecent = From s In blog.BlogPosts() _
Group s By s.id Into g = Group _
Select id, Version = g.Max(Function(s) s.Version)
Dim live_posts = (From s In blog.BlogPosts() _
Join q In mostRecent _
On q.id Equals s.Id And q.Version Equals s.Version _
Where s.Status = ContentLifecycleStatus.Live _
Select s)
Hi Josh ,
You are getting only the live content - ContentLifecycleStatus.Live
You can use ContentLifecycle.Master.
Kind regards,
Ivan Dimitrov
the Telerik team