How to create a conditional Navigation

#1

Hallo,

I use Ghost.

i would like to have a conditional navigation menu. Something like this

{{#foreach navigation}}
{{#if checklabel}}
<a class=“navbar-item nav-{{slug}}{{#if current}} is-active{{/if}}” href="{{url absolute=“true”}}">{{label}}
{{else if next}}
<a class=“navbar-item button is-warning nav-{{slug}}{{#if current}} is-active{{/if}}” href="{{url absolute=“true”}}">{{label}}
{{/if}}
{{/foreach}}

Where to write checklabel condition? checklabel must return true or false

Thanks

#2

It works with the has helper

closed #3

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