Name: djangocms-local-navigation
Owner: Liip
Description: Local navigation plugin for DjangoCMS
Created: 2016-08-23 12:45:44.0
Updated: 2016-08-23 12:46:40.0
Pushed: 2017-08-28 08:17:36.0
Homepage: null
Size: 17
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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.
$ pip install djangocms-local-navigation
Then add it to INSTALLED_APPS:
ALLED_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:
PLUGIN_PROCESSORS = (
# ...
'djangocms_local_navigation.cms_plugin_processors.patch_elements',
You should now be able to add the plugin “Local menu” to your pages.
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
.
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.
To run the tests, use ./setup.py test
.