django-fluent-pages
django-fluent-pages copied to clipboard
Idea: Concept of in_navigation expanded to specific navigation area.
For example one would be able to decide that the "custom quote" page is in_navigation but only shows in the footer navigation. The different navigation areas can be specified in settings.py, as those are typically statically defined by the website design, and then a staff member can select which navigation area(s) is appropriate for the specific page in the admin with a multi-select. The render_menu template tag would need a new argument to have a simple slug passed through to the in_navigation queryset method such as 'header', or 'footer', or 'mobile', etc.
Example:
settings.py
from django.utils.translation import ugettext_lazy as _
...
FLUENT_PAGES_NAVIGATION_AREA = (('header', _('Header')),('footer', _('Footer')))
...
template.html
...
{% render_menu max_depth=1 template="fluent_pages/parts/menu.html" area="header" %}
...
+1
While I also have a need for multiple menu items, I wonder whether it should be solved this way. The major issue with this is that you can't change the ordering for a different menu.
For one website, I've written a custom menubar app. What would you think of using such approach? (and thus getting that source)
The only type of ordering you couldn't do is having pages in multiple menus but in different orders in each menu. In my experience if pages appear in multiple menus it's often fine to order them the same.
The only way around that I can think of is having separate page trees for each menu, but that could be confusing. If you delete a page from one, does it get deleted from the other? If a page is in multiple trees, which is its canonical URL?
Another solution is if you had a master list (not a tree) of pages that let you create/update/delete pages and then one page tree per menu where you can just add/remove existing pages (without modifying the pages themselves).
@vdboor How did your menubar app work? If you could post the source that'd be great.