APIs & Integrations

aimai123
Member

Get all blog posts from list exceeding supported function limit in HUBL

Hello,

 

Is there a way to get a list of all blog posts in HUBL from a blog list that exceeds the function limit?  I want to do something like below, but only the first 200 blog posts show. 

 

{% set news = blog_recent_posts('5268670713', blog_total_post_count('5268670713')) %}
{% for post in news %}
<div class="post-item">
<a class="post-item__title" href="{{ post.absolute_url }}" style="color: #000;">{{ post.title }}</a>
</div>
{% endfor %}

0 Upvotes
1 Reply 1
WendyGoh
HubSpot Employee
HubSpot Employee

Get all blog posts from list exceeding supported function limit in HUBL

Hi @aimai123,

 

I hope all is well with you 😄

 

While there isn't a way to get more than 200 blog posts using the blog_recent_posts hubl.

 

HubSpot has a built in /all-posts-link code:

<a class="all-posts-link" href="{{ group.absolute_url }}/all">All posts</a>

You can check it out here: https://designers.hubspot.com/docs/hubl/blog-content-markup. This pulls all posts that can be found at your blog page. E.g. https://www.{{blog page}}.com/train/all.

 

I hope this helps!

0 Upvotes