diff --git a/templates/base.html b/templates/base.html index e19a83d..c954997 100644 --- a/templates/base.html +++ b/templates/base.html @@ -23,8 +23,8 @@
{% wagtailuserbar %} - {% cache 3600 "navbar" page %} - {% navbar page %} + {% cache 3600 "navbar" %} + {% navbar %} {% endcache %} {% block main %} diff --git a/website/common/templatetags/navbar_tags.py b/website/common/templatetags/navbar_tags.py index 15a4c5a..1ccae63 100644 --- a/website/common/templatetags/navbar_tags.py +++ b/website/common/templatetags/navbar_tags.py @@ -1,5 +1,4 @@ from django.template import Library -from wagtail.models import Page from website.home.models import HomePage @@ -7,10 +6,9 @@ register = Library() @register.inclusion_tag("common/navbar.html") -def navbar(current_page: Page) -> dict: +def navbar() -> dict: homepage = HomePage.objects.live().get() return { - "current_page": current_page, "homepage": homepage, "nav_pages": homepage.get_children() .live()