Allows you to add and edit custom named menus similar to Wordpress menus
Project description
Django CMS Named Menus
An extension for Django CMS that allows you to create multiple menus like Wordpress
Replaces Previous Versions
This replaces the previous versions by Ryan Bagwell and Rogerio Carrasqueira which are no longer actively updated
Originally forked from:
- https://github.com/rgcarrasqueira/django-cms-named-menus
- https://github.com/ryanbagwell/django-cms-named-menus
Installation
-
Install with pip
pip install djangocms-named-menus
-
Add
cms_named_menus
to INSTALLED_APPS -
Run migrations
python manage.py migrate
Upgrading from Previous Version
-
Uninstall previous version with pip
pip uninstall -y django-cms-named-menus
-
The migrations and code will pick up previous versions correctly.
Usage
After installation, place the {% show_named_menu 'MenuName' %}
template tag where you want your menu to appear.
{% load named_cms_menu_tags %}
<ul>
{% show_named_menu "Main Menu" %}
</ul>
Next, create your menu in the admin area using the drag and drop interface. Drag items with child menu items:
Drag items without child menu items:
Settings
The following settings can be changed by adding to your project's settings.py file:
- Override the default cache duration for Named Menus, default = 3600 seconds
CMS_NAMED_MENUS_CACHE_DURATION = 3600
- Set the application namespaces that can be used with Named Menus as a list, default is CMS pages only - as the page id will not be unique for other applications e.g. Aldryn NewsBlog etc. (default = ['CMSMenu',])
CMS_NAMED_MENUS_NAMESPACES = ['CMSMenu',]
or to allow ALL namespaces:
CMS_NAMED_MENUS_NAMESPACES = None
- Automatically remove pages that have been unpublished, deleted, or removed from Navigation (default = True)
CMS_NAMED_MENUS_REMOVE_UNAVAILABLE_PAGES = True
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for djangocms-named-menus-1.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 121a3798465b6a488ffc14132e239fee93812435d21180b2ff87b528ba72ec93 |
|
MD5 | fe53b94db921bd6e897c2b7bd0e0c631 |
|
BLAKE2b-256 | 89a943e8c4e7660975c48882fd408c29d163e4d82b28c7ed4c9590378c7db37f |
Hashes for djangocms_named_menus-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a6246c780243b3c9602ab9723af1e1869851a4e1726dfd93121664923d07736 |
|
MD5 | ced89356594b93d20d8479d261efbee3 |
|
BLAKE2b-256 | 23780fb4f67e58a53e0dc56c7b4a2983018c0e3e856002ab61ca83efbbf6425a |