Join Blogs and BlogPost

joyanta sen asked on October 23, 2018 00:16

Hi, Could you please tell me what is the best way to join Blogs and BlogPost page type as they don't have anydirect relationship?

Recent Answers


Brenden Kehren answered on October 23, 2018 00:59

The direct relationship is through the path. What are you looking to do?

0 votesVote for this answer Mark as a Correct answer

joyanta sen answered on October 23, 2018 01:17 (last edited on October 23, 2018 06:19)

Hi Brenden, I need to display the most recent blogs name based on the latest posted blogs.

For ex: If I have 2 blogs SampleBlog and TestBlog. I posted 2 blogs under SampleBlog yesterday and posted a blog under TestBlog today. So in Recent Blog section it should display the blog name like below:

 TestBlog
 SampleBlog

Could you please tell me how to achieve that. Thanks.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on October 24, 2018 15:28

In your repeater set the following for the properties:

  • Path: /% -- this will look at the root of the site to check all pages.
  • Page Types: CMS.BlogPost -- this will limit to only look for Blog Posts and no other pages
  • Maximum nesting level: -1 -- let it go as many levels deep as it needs to find those posts
  • Order By expression: BlogPostDate DESC -- show the blog posts in order by most recent
  • Select top N pages: 10 -- or however many posts you want your repeater to show
  • Set the transformation to a value of a transformtion you've created

These should get you started in displaying some blog posts. The key is the path and page types. Those two properties alone will limit your content tree down pretty quick.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.