def get_context(self, request): # bootstrap the render context context = super().get_context(request) context = set_main_site_nav_information(self, context, 'Homepage') context = get_page_tree_information(self, context) # perform entry pagination and (optional) filterin entries = self.get_entries(context) context['has_more'] = self.page_size < len(entries) context['entries'] = entries[0:self.page_size] return context
def get_context(self, request, bypass_menu_buildstep=False): context = super().get_context(request) context = set_main_site_nav_information(self, context, 'MozfestHomepage') context = get_page_tree_information(self, context) # Also make sure that these pages always tap into the mozfest newsletter for the footer! mozfest_footer = Signup.objects.filter(name__iexact='mozfest').first() context['mozfest_footer'] = mozfest_footer if not bypass_menu_buildstep: context = set_main_site_nav_information(self, context, 'MozfestHomepage') return context