CMS Development

rociogue
Participant

Add text_summary to recommended post listing module by Hubspot

Hi there,

I am looking for solving an issue with recommended post listing module made by Hubspot. I want to add a new field, at the moment I got to add this one and it is working right now:

 

include_featured_image='{{ module.include_featured_image }}',

 

Screenshot 2019-07-25 at 15.45.10.png

 

But I need to add a summary text on the recommended post listing. I tried to add this field but it didn't work:

 

show_detail="{{ module.show_detail }}",

 

Please, if someone can help me with that...

Thanks in advance.

0 Upvotes
2 Replies 2
lscanlan
HubSpot Alumni
HubSpot Alumni

Add text_summary to recommended post listing module by Hubspot

Hi @rociogue,

 

I don't think the post listing module includes functionality for adding the summary, since it's meant to just be a list of posts. So that's likely why you aren't finding a way to add that field to your module tag.

 

Could you instead use one of the functions documented here: https://designers.hubspot.com/en/docs/hubl/hubl-supported-functions, and then create your own list? Something along these lines:

 

{% set pop_posts = blog_popular_posts('default', 5) %}
<h3>Popular posts</h3>
<ul>
  {% for pop_post in pop_posts %}
    <li>
      <a href="{{ pop_post.absolute_url }}">{{ pop_post.name }}</a>
      <p>{{ pop_post.post_summary }}</p>
    </li>
  {% endfor %}
</ul>

And if you have any questions with something like this, let me know.

 

Leland Scanlan

HubSpot Developer Support
0 Upvotes
rociogue
Participant

Add text_summary to recommended post listing module by Hubspot

Hi @lscanlan ,

 

Many thanks for the answer but I am looking for another solution. 

 

I don't understand why I cannot add the summary field to the recommended post listing. I was about to do that but I didn't get to solve the problem.

 

Regards.

 

 

0 Upvotes