summaryrefslogtreecommitdiffstats
path: root/blog/_includes/menubar.html
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2017-08-28 15:10:45 +0200
committerHarald Eilertsen <haraldei@anduin.net>2017-08-28 15:10:45 +0200
commit0ecf7e6c4ea2a64f4ec186ddad987a9c3ecdf46c (patch)
treeb946edc3cec74556e6e82184508b3080877209d2 /blog/_includes/menubar.html
parent1cd6080d8b775f8b333699b579397f1cdbadac3d (diff)
downloadnorsk-urskog-main-0ecf7e6c4ea2a64f4ec186ddad987a9c3ecdf46c.tar.gz
norsk-urskog-main-0ecf7e6c4ea2a64f4ec186ddad987a9c3ecdf46c.tar.bz2
norsk-urskog-main-0ecf7e6c4ea2a64f4ec186ddad987a9c3ecdf46c.zip
List only pages in current language in the menu bar.
Diffstat (limited to 'blog/_includes/menubar.html')
-rw-r--r--blog/_includes/menubar.html5
1 files changed, 3 insertions, 2 deletions
diff --git a/blog/_includes/menubar.html b/blog/_includes/menubar.html
index 4d7237f..83768de 100644
--- a/blog/_includes/menubar.html
+++ b/blog/_includes/menubar.html
@@ -1,8 +1,9 @@
<div id="page-menu">
<nav class="site-nav">
<a class="page-link" href="{{ site.baseurl | append: "/" }}">Hjem</a>
- <a class="page-link" href="{{ site.baseurl_root | append: "/registration" }}">Registrering</a>
- {% for page in site.pages %}
+ <a class="page-link" href="{{ site.baseurl | append: "/registration" }}">Registrering</a>
+ {% assign pages_in_lang = site.pages | where_exp: "p","p.lang == page.lang" %}
+ {% for page in pages_in_lang %}
{% if page.title and (!page.hidden == true) %}
<a class="page-link" href="{{ page.url | prepend: site.baseurl | remove: 'index.html' }}">{{ page.title }}</a>
{% endif %}