We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdc19c5 commit e385037Copy full SHA for e385037
apps/core/models/content.py
@@ -45,14 +45,16 @@ class ContentPage(Page):
45
search_fields = Page.search_fields + [index.SearchField("body")]
46
47
def get_context(self, request, *args, **kwargs):
48
+ context = super().get_context(request, *args, **kwargs)
49
+
50
if self.live and self.show_in_menus:
- context = super().get_context(request, *args, **kwargs)
51
pages = Page.objects.live().in_menu()
52
context.update(
53
previous=pages.filter(path__lt=self.path).last(),
54
next=pages.filter(path__gt=self.path).first(),
55
)
- return context
56
57
+ return context
58
59
def serve(self, request):
60
if request.method == "POST":
0 commit comments