Y
Y
Yura Khlyan2018-10-09 14:43:40
Django
Yura Khlyan, 2018-10-09 14:43:40

How to add page order to the menu?

Good day.
I'm using Django-Wagtail and I want to set the page order on the main menu myself. How can I do it better?
For now, I only display all the pages in the order that the database returns:

# context_processors.py

def menu(request):
    return {'menuitems': Page.objects.live().filter(show_in_menus=True)}

Thanks in advance for the answer.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question