Skip to main content
# 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:

```python
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:

```python
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](https://www.crummy.com/software/BeautifulSoup/bs4/doc/#specifying-the-parser-to-use)
for more information. Be advised that [lxml has known issues with
mod_python](http://lxml.de/FAQ.html#my-program-crashes-when-run-with-mod-python-pyro-zope-plone)
and can cause your processes to hang.

## Development

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

Metadata

Release files for djangocms-local-navigation 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djangocms-local-navigation 1.4.1
File Size Uploaded Provenance
djangocms-local-navigation-1.4.1.tar.gz 4.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for djangocms-local-navigation 1.4.1
File Interpreter ABI Platform
djangocms_local_navigation-1.4.1-py2-none-any.whl Python 2 none any Details

Total release size: 12.5 kB

Release files / djangocms-local-navigation-1.4.1.tar.gz

Download URL djangocms-local-navigation-1.4.1.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
71655597e0cbe6cf9dffd53a2aa78c77856fa80f3d027bd449cb7e5eaf24bfa0
BLAKE2b-256 checksum
How to use checksums
e9eb22fd2eb5a9f7a1b50e523c2a98a063b455f6f443086519860baa36b675b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / djangocms_local_navigation-1.4.1-py2-none-any.whl

Download URL djangocms_local_navigation-1.4.1-py2-none-any.whl
Size 7.8 kB
Tags Python 2
SHA-256 checksum
How to use checksums
382aa3329c9dc75bcf7bf2e0ada2f3bf4841af2fe08480be26d135973797f213
BLAKE2b-256 checksum
How to use checksums
95f11fb25bc1d25de7dd2a8609c9ecfb4959d0715d83348346d88995004bd631
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for djangocms-local-navigation 1.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page