Handlebars template not generating anything


#1

Hello, I’m working on my own theme and trying to use this handlebars code to not insert the label in the li when the slug has some specific names. However, this code doesn’t work at all, and handlebars doesn’t generate anything inside the ul element. I feel like I’m missing something obvious, any help would be appreciated.

<div class="sidebar">
<div class="sidebar-inner">
	<h1 class="blog-title">{{@blog.title}}</h1>
	<h2 class="blog-description">{{@blog.description}}</h2>
	<div class="sidebar-list">
	    <ul>
			{{#foreach navigation}}
				{{#has slug="icon-docker-hub, icon-email, icon-github, icon-dribbble, icon-slack, icon-reddit, icon-digg, icon-facebook, icon-gitlab, icon-telegram, icon-twitter"}}
				<a href="{{url absolute="true"}}">
				<li class="{{slug}}" role="presentation"></li>
				</a>
				{{else}}
				<a href="{{url absolute="true"}}">
				<li class="sidebar-text" role="presentation">{{label}}</li>
				</a>
				{{/has}}
			{{/foreach}}
	    </ul>
	</div>
</div>

#2

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.