Hola! ¡Tenemos nuestra Comunidad en Español!

Using topic.name in a blog listing

Highlighted

I have a blog listing page that displays the topics name above the listing. I have done this by simply using {{ topic }} however this seems to output the slug rather than the name. I have tried using {{ topic.name }} as referenced at the bottom of the page here http://designers.hubspot.com/docs/hubl/hubl-supported-variables however it then does not output anything.

How can I output the topics name on the listing page?

Reply
0 Upvotes
3 Replies 3
Community Manager

Hi @MikeyWallis,

{{ topic.name }} should work; can you direct message me a link to the blog you’re working on so I can take a closer look?

Reply
0 Upvotes

Thanks Derek, inboxed you.

Reply
0 Upvotes
Regular Contributor

topic.name still doesn't work. It outputs nothing. Neither does topic.slug. Only topic works, and it just outputs the slug.

 

Currently we circumvent this by using page_meta.html_title|replace(group.html_title ~ ' | ', ''), which uses the topic page's title and strips the site title away from it, but it just feels silly. Maybe a fix to this bug should already be in order?

 

(While you're at it, could you also fix the content.publish_date, which doesn't work for pages, only for blog posts.)

Reply
0 Upvotes