Blog listing page, I am trying to wrap my head around this


#1

I am trying to get acquainted with the Hubspot way of doing things.

In my blog listing page I was taked with implimenting groups of listings based ont blog types, I figured out how to do that by using this line of code.

  <div class="post-listing">{% related_blog_posts, blog_ids="2515033", tags="customer-success" %} {% endif %} 

This gives me the three recent posts with the tag customer-success which is what I want. The only thing is that it created the elements for me, based on I don't know what, and I am trying to have some custom content for each returned item. I have been looking through the documentation and not really sure what to do, am I to use javascript to add HTML elements or can I access things with the templating language. I have tried adding loops and if statements after my above line of code but with this more or less returning complete items, it hasn't been sucsessfull.

Thanks for your assistance in advance.


#3

Hi @JbullDatapath, would you mind clarifying what exactly your roadblock is here? It looks like you're attempting to get related post information for a related post section in your blog as per this documentation.

If I'm understanding you properly, are you looking to change the underlying HTML markup in the related posts module? If so, you can either control this using a Macro as explained at the bottom of the linked article above, or use this article to have more flexibility and control over your markup.


#4

That is what I found, the Macro being the way to change what is returned from the related-posts. Now I just need to figure out how to work with the macro. Starting to get it.

Thanks again for responding, sorry for the delay, part time dev here :slight_smile:
John