feat: new dynamic pages in admin panel
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from django.db.models import Prefetch
|
||||
|
||||
from apps.core.models import SiteBranding, SiteContact
|
||||
from apps.pages.models import CustomPage
|
||||
from apps.products.models import MainProduct, SubProduct
|
||||
|
||||
|
||||
@@ -28,8 +29,13 @@ def navigation(request):
|
||||
all_footer_products = list(main_products[:5])
|
||||
footer_main_products = all_footer_products[:4]
|
||||
footer_main_products_has_more = len(all_footer_products) == 5
|
||||
nav_custom_pages = CustomPage.objects.filter(
|
||||
is_published=True,
|
||||
show_in_nav=True,
|
||||
).order_by("menu_order", "title")
|
||||
return {
|
||||
"nav_main_products": main_products,
|
||||
"nav_custom_pages": nav_custom_pages,
|
||||
"footer_main_products": footer_main_products,
|
||||
"footer_main_products_has_more": footer_main_products_has_more,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user