%# %> <% if (currentURI !== "/") { %> Home <% } %> <% for (let page of navigationPages) { %> <% if (page.subpages) { %> <%- pageLinkHTML(page).replace("<" + "/li>", "") %> <% if (page.uri === currentURI || page.subpages.some(subpage => subpage.uri === currentURI)) { %> <% for (let subpage of page.subpages) { %> <% if (!subpage.hidden || subpage.uri === currentURI) { %> <%- pageLinkHTML(subpage) %> <% } %> <% } %> <% } %> <% } else { %> <%- pageLinkHTML(page) %> <% } %> <% } %> <%# %>