Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

djangocms-local-navigation

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

djangocms-local-navigation

Display menus based on the HTML structure of the pages

  • 1.4.1
  • PyPI
  • Socket score

Maintainers
1

djangocms-local-navigation

This package provides a DjangoCMS plugin that displays a menu based on the structure of the current page. You can for example create a local menu that is based on all the h2 elements on your page.

Installation

$ pip install djangocms-local-navigation

Then add it to INSTALLED_APPS:

INSTALLED_APPS = (
    # ...
    'djangocms_local_navigation',
)

Also add the plugin processor, which will add the id attributes to your navigation elements, allowing you to actually linking to them:

CMS_PLUGIN_PROCESSORS = (
    # ...
    'djangocms_local_navigation.cms_plugin_processors.patch_elements',
)

You should now be able to add the plugin "Local menu" to your pages.

Configuration

CMS_LOCAL_NAVIGATION_NAV_ELEMENTS

Default: h2

Defines which elements are used to create the local menu. This is a CSS selector so if you want for example only elements with the class local-navigation-heading to be included in the navigation you could use h2.local-navigation-heading.

CMS_LOCAL_NAVIGATION_XML_PARSER

Default: None (means automatic detection)

Defines which XML parser is used to add anchors to the elements and create the menu. Refer to the BeautifulSoup documentation for more information. Be advised that lxml has known issues with mod_python and can cause your processes to hang.

Development

To run the tests, use ./setup.py test.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc