Skip to content

useHTML5/django-cms-named-menus

 
 

Repository files navigation

Django CMS Named Menus

An extension for Django CMS that allows you to create multiple menus like Wordpress

Installation

  1. Install with pip pip install django-cms-named-menus
  2. Add cms_named_menus to INSTALLED_APPS
  3. Run ./manage.py migrate

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.

ui.png

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

About

Create named menus in Django CMS like Wordpress

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 61.2%
  • Python 24.8%
  • HTML 9.3%
  • CoffeeScript 3.7%
  • CSS 1.0%