CMS Development

jrouault
Miembro

problem to show topics in navigation

I have created a blog as well all articles (linked to topics) and I would like to display the topics on the navigation of my header. 

Here irs my code : 

<div class="header" id="sticky-nav">
<a class="logo" href="https://blog.energiency.com/"> 
<img src="https://cdn2.hubspot.net/hubfs/5514146/images/energiency_-_logo.png"> 
</a> 
<input id="nav" type="checkbox"> 
<label for="nav"></label>
<nav>
<ul class="active-branch">{% set my_topics = blog_topics('default', 3) %} {% for item in my_topics %}
<li><a href="{{ blog_tag_url(group.id, item.slug) }}">{{ item }}</a></li>
{% endfor %}
<li><a href="#newsletter-ancre">Newsletter</a></li>
</ul>
</nav>
</div>

 I did the same code in my footer and the topics are displayed correctly. 

I don't understand where the error came from. I have created several blogs before with this code and it's works excepts on this one, if someone knows the solutions I am interested 

0 Me gusta
1 Respuesta 1
prosa
Colaborador líder

problem to show topics in navigation

Hi there, can you print the content of your variable to take a look of what is in there?

If this post helped you resolve your issue, please consider marking it as the solution. Thank you for supporting our HubSpot community.
0 Me gusta