diff --git a/opentech/public/home/templates/home/home_page.html b/opentech/public/home/templates/home/home_page.html index e799b2bb4c6153a6033b038d418d7dcb714742f3..71b487cd38b23624e2657e94b9d44a69908186fe 100644 --- a/opentech/public/home/templates/home/home_page.html +++ b/opentech/public/home/templates/home/home_page.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load wagtailcore_tags wagtailimages_tags static navigation_tags %} +{% load cache wagtailcore_tags wagtailimages_tags static navigation_tags %} {% block header %} {% image page.header_image fill-1440x740 as header_image %} @@ -26,7 +26,9 @@ </div> <section class="header__menus header__menus--desktop"> - {% primarynav %} + {% cache 3600 navigation__primary %} + {% primarynav %} + {% endcache %} <button class="button button--contains-icons button--left-space js-search-toggle" aria-haspopup="true" aria-label="Toggle desktop search"> <svg class="header__icon header__icon--open-search icon"><use xlink:href="#magnifying-glass"></use></svg> @@ -48,7 +50,9 @@ </button> </div> </div> - {% primarynav %} + {% cache 3600 navigation__primary %} + {% primarynav %} + {% endcache %} </section> <div class="header__button-container"> diff --git a/opentech/templates/base.html b/opentech/templates/base.html index 3d0f9873f7c35b627ec66df4b13cd233c0520fba..4a30fb9ae4368b2557a4aecea008c551c01c013f 100644 --- a/opentech/templates/base.html +++ b/opentech/templates/base.html @@ -1,4 +1,4 @@ -{% load static wagtailuserbar wagtailcore_tags wagtailimages_tags navigation_tags util_tags %}<!doctype html> +{% load static cache wagtailuserbar wagtailcore_tags wagtailimages_tags navigation_tags util_tags %}<!doctype html> <html class="no-js" lang="en"> <head> {# TODO fallbacks if page is not defined e.g. for 404 page #} @@ -92,7 +92,9 @@ </div> <section class="header__menus header__menus--desktop"> - {% primarynav %} + {% cache 3600 navigation__primary %} + {% primarynav %} + {% endcache %} <button class="button button--contains-icons button--left-space js-search-toggle" aria-haspopup="true" aria-label="Toggle desktop search"> <svg class="header__icon header__icon--open-search icon"><use xlink:href="#magnifying-glass"></use></svg> @@ -114,7 +116,9 @@ </button> </div> </div> - {% primarynav %} + {% cache 3600 navigation__primary %} + {% primarynav %} + {% endcache %} </section> <div class="header__button-container">