From 07b2f54cb6efd383bfd283acc972b5fb9f847c73 Mon Sep 17 00:00:00 2001 From: Sylvain Boissel Date: Mon, 22 Jan 2024 10:28:47 +0100 Subject: [PATCH] Add skiplinks --- content_manager/models.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/content_manager/models.py b/content_manager/models.py index 6248457f..e1cf6cae 100644 --- a/content_manager/models.py +++ b/content_manager/models.py @@ -61,6 +61,15 @@ class ContentPage(Page): index.SearchField("body"), ] + def get_context(self, request, *args, **kwargs): + context = super().get_context(request, *args, **kwargs) + + context["skiplinks"] = [ + {"link": "#content", "label": "Contenu"}, + {"link": "#fr-navigation", "label": "Menu"}, + ] + return context + class MonospaceField(models.TextField): """