Can I use a "Blog Post" inside a "Blog Post"?

Hi

Recently, my Treepl has been very slow, and now I seem to have figured out the reason.

I wanted to show blogs and on the right hand side of the blog, I wanted to display some titles of recent blogs, so I created a snippet(recent_articles) and inserted the snippet in each blog

Recent Articles

    {% component source: "Blog Post", layout: "Recent Article", type: "module", sortBy: "releasedate",limit:"4"%}

The problem is the page won’t load with the snippet, because of the recursion I guess.
But I do need a snippet that can display the latest 5 blogs, I was wondering if there is a work around?

Thank you so much!

I am sorry, this is the snippet:

<h3>Recent Articles</h3> 

<ol class="blogsitesummary">
    {% component source: "Blog Post", layout: "Recent Article", type: "module", sortBy: "releasedate",limit:"4"%}
</ol>

there is still a

wrapping all the above codes.

there is still a < div >

wrapping all the above codes.

Hi @Linda. I think I’m confused by your terminology here.
Just to clarify, a ‘Blog’ is the overall container module (typically a site would only have 1 Blog) and ‘Blog Posts’ are the individual articles within a given Blog.

So do you have multiple Blogs on your site?
And you are listing those Blogs on a page, but also want to display a few recent Posts for each Blog?

A link to the site might really help. You can PM me the link if more appropriate.

Hi @Adam.Wilson,

Thank you so much for your reply.

Yes, there are multiple ‘Blog’ modules on my site (Does this cause a problem?) Each Blog contains a Post. and I also want to display a few recent Posts for each Post. I will PM you the link.

Thank you!

Hi @Linda ,
You can’t render a snippet with a Blog List in Blog Post Description because of recursion. You’d better render this snippet in a Blog Post Detail.

Hi @Irene,

Thank you for your reply.
Did you mean I should take out the snippet form the blog post and put it in a blog post layout?

Yes, from the blog post description in a blog post detail layout. And you have the same code in all the posts description, so you can move this code to the blog post detail layout and keep only the part that changes in the blog post description.

Hi @Irene

Thank you so much for your advice. It solved my problem!