CMS Development

benji_thecroc
Contributor | Gold Partner
Contributor | Gold Partner

Blog listing based on Tag

SOLVE

Hi,

 

I'm trying to setup five blog listing pages. Each page needs to pull blogs with a specific tag. In terms of structure we will have the most recent blog post seperate from the listing at the top of the page and then have the next six blogs underneath with pagination. This page has some indicators but it's not completely what I'm trying to implement - https://designers.hubspot.com/docs/hubl/blog-content-markup

 

Being new to HubL I'm not entirely sure how to execute this using the HubL language. If anyone can set me on the right direction. I guess I need a query to find most recent post and then a loop dictated by a specific tag and excluding the most recent post (worst comes to worst I can just 'display:none' the very first post in the loop via css)

 

Any help is greatly appreciated.

 

Thanks

0 Upvotes
2 Accepted solutions
ndwilliams3
Solution
Key Advisor

Blog listing based on Tag

SOLVE
0 Upvotes
ndwilliams3
Solution
Key Advisor

Blog listing based on Tag

SOLVE

to exclude the first listing, just use an if statement with the loop.first or loop.index parameter.

https://designers.hubspot.com/docs/hubl/for-loops

 

View solution in original post

0 Upvotes
3 Replies 3
roisinkirby
HubSpot Product Team
HubSpot Product Team

Blog listing based on Tag

SOLVE

Hey @benji_thecroc thanks for your question! @ndwilliams3 is this something you have any experience with?

0 Upvotes
ndwilliams3
Solution
Key Advisor

Blog listing based on Tag

SOLVE
0 Upvotes
ndwilliams3
Solution
Key Advisor

Blog listing based on Tag

SOLVE

to exclude the first listing, just use an if statement with the loop.first or loop.index parameter.

https://designers.hubspot.com/docs/hubl/for-loops

 

0 Upvotes