<div data-container="nav-items">
{{#each this}}
<div class="nav-item-wrapper">
    <a href="?page={{id}}" class="nav-item{{#if isActive}} active{{/if}}{{#if active}} active{{/if}}" data-page="{{id}}" data-type="nav-item" data-id="{{id}}" data-name="{{name}}" data-icon="{{icon}}">
        <div class="icon-container">
            <i class="{{icon}}"></i>
        </div>
        <span class="nav-text" data-editable="nav-item-name">{{name}}</span>
    </a>
    {{#if submenu}}
    <div class="submenu">
        <div class="submenu-header">{{name}}</div>
        {{#each submenu}}
        <a href="?page={{../id}}#{{#if slug}}{{slug}}{{else}}{{name}}{{/if}}" class="submenu-item" data-page="{{../id}}" data-category="{{name}}" data-category-id="{{#if slug}}{{slug}}{{else}}{{name}}{{/if}}">
            <i class="{{icon}}"></i>
            <span>{{name}}</span>
        </a>
        {{/each}}
    </div>
    {{/if}}
</div>
{{/each}} 
</div> 
