CMS Development

Participante | Partner
Participante | Partner

Issue with content.post_summary

I'd like to set it up so that on topic listing pages on a certain blog, a unique summary is shown underneath the title. is an example. I've set it up so that blog posts have the summary on them, but the summary is invisible on the blog post itself.
When I add {{ content.post_summary }} underneath the blog title in the listing temple, it does not show the summary. It seems that {{ content.post_summary }} takes the hide tags into account when it pulls content. Is there a way to prevent it from doing so?
0 Me gusta
2 Respuestas 2
Exmiembro de HubSpot
Exmiembro de HubSpot

Issue with content.post_summary

Hi @Jmc123,


Just wanted to add an alternative here, since I think I understand what you're trying to do, and I've done it before on other blogs. You could create a custom module that has a field for the topic listing summary. So long as it's on the post template, the data from that will be accessible on the listing pages.


Then within the listing template, you can check to see if you're on a topic listing page by using: {% if topic %} .


So if you want your custom summary to only appear on topic listings, you could do something like this:


{% if topic %}
  {# custom summary from custom module here #}
{% else %}
  {{ content.post_summary }}
{% endif %}

Once you publish a post with the custom summary from your custom module, you can use the Developer Info tab: to find how to access the value for that field.


If you do decide to set this up and have trouble with it, let me know and I'll be happy to take a look.


 - Leland

Leland Scanlan

HubSpot Developer Support
Administrador de la comunidad
Administrador de la comunidad

Issue with content.post_summary

Hi @Jmc123,


The link you refered leads to a 404 error. With that said, it sounds like you want a summary at the top of each page which could be done through a rich text module as opposed to putting in a token. 


If I am misunderstanding what you are looking to accomplish, please let me know. The more details, screenshots and information you can provide, the better the Community can assist!


Thank you,

0 Me gusta