Skip to main content

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:

Installation

  1. Install with pip pip install djangocms-named-menus

  2. Add cms_named_menus to INSTALLED_APPS

  3. Run migrations python manage.py migrate

Upgrading from Previous Version

  1. Uninstall previous version with pip pip uninstall -y django-cms-named-menus

  2. 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:

screenshot

Drag items without child menu items:

screenshot

Settings

The following settings can be changed by adding to your project's settings.py file:

  1. Override the default cache duration for Named Menus, default = 3600 seconds
CMS_NAMED_MENUS_CACHE_DURATION = 3600
  1. 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
  1. Automatically remove pages that have been unpublished, deleted, or removed from Navigation (default = True)
CMS_NAMED_MENUS_REMOVE_UNAVAILABLE_PAGES = True

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangocms-named-menus-2.0.2.tar.gz (124.9 kB view details)

Uploaded Source

Built Distribution

djangocms_named_menus-2.0.2-py3-none-any.whl (134.0 kB view details)

Uploaded Python 3

File details

Details for the file djangocms-named-menus-2.0.2.tar.gz.

File metadata

  • Download URL: djangocms-named-menus-2.0.2.tar.gz
  • Upload date:
  • Size: 124.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.0

File hashes

Hashes for djangocms-named-menus-2.0.2.tar.gz
Algorithm Hash digest
SHA256 42c33c2f9714902aa0dc8aa5a644bd92d9a1d85bab262d73246bb85ae2740359
MD5 6c40430bbb29d70dc577048997ec4b98
BLAKE2b-256 6833475444745ac5a9fe0804f0e6e51a2e23e6309081524bbffc22d4e5d11e03

See more details on using hashes here.

File details

Details for the file djangocms_named_menus-2.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for djangocms_named_menus-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2ba6882d89cef6fa56d63a28091339e92854fff2c2c459a3946d527df64ac084
MD5 98399e8e47af35b16e21f3ba27b474af
BLAKE2b-256 11ee0af8788a215396daeb7cc70f3ce9ec8c6788b4e8407485bf17e3c5381d7a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page