Menu Manager
Build your site's menus by hand in jContent, independently of the page tree: pages, sections and links, ordered by drag and drop, translated per language with a fallback, and shown to each visitor with only what they may read. Place them on pages with the Menu component (Menu Manager views).
Menu Manager adds a Menus screen to jContent. A site's navigation no longer has to follow its page tree: editors build as many menus as the site needs (a main menu, a footer, a section's own menu), the way WordPress does, and place each one where it belongs.
Build
- Add pages chosen in the site's tree (several at once, with their subpages if you wish), sections (a heading with no link, a column title in a mega menu), internal links to any content of the platform and external links.
- Order and nest items by drag and drop, three levels deep, or with each item's Move buttons from the keyboard.
- Give an item a label, a description and a style (normal, highlighted, button), and switch it off in the languages where it does not belong.
- Top-level items can carry a promotion shown in mega menus: an image, a title, a text and a button.
Translate
- Labels are written per language. A label missing in a language falls back to the page's title in that language, then to the menu's fallback language, so a menu is never half empty.
- A preview shows the menu as visitors will see it in the language being edited.
Publish safely
- Changes stay on the screen until you save; two editors never overwrite each other's work unknowingly.
- Each visitor sees only the items and pages they are allowed to read, and cached pages never show one visitor's menu to another.
- Badges flag what visitors will not see: a page not published yet, a page restricted to some users, a deleted target.
Place
- The Menu component (package Menu Manager views) shows a menu on any page, as a horizontal bar, a mega menu, a vertical list or columns. In Page Builder, each Menu component links to the screen to edit its menu.
Requires Jahia 8.2 with jContent 3.7 or later. English and French.
Captures d'écran
Comment installer
Requirements
- Jahia 8.2.1.0 or later, with jContent 3.7 or later, the GraphQL provider 3.5 or later and the JavaScript modules engine 1.3 or later (for the Menu component).
- No configuration file, no external service.
- To place menus on pages: a template set whose areas accept Jahia navigation components or any droppable content (for example a Free zone of classic-templates).
1. Install the two modules (once per server)
- Install Menu Manager, then Menu Manager views, from the Jahia Store, or download menu-manager-1.0.0.jar and menu-manager-views-1.0.0.tgz from the GitHub release.
- For the files: open Administration > Server > Modules and Extensions > Modules, tab Installed modules. Under Upload module from file, click Select module, choose menu-manager-1.0.0.jar and upload it; then the same with menu-manager-views-1.0.0.tgz.
- Both appear in the list with the state Started.
2. Enable them on each site
- In the same list, click Menu Manager. Under Usage in sites, switch each site from Disabled to Enabled.
- Do the same for Menu Manager views.
3. First configuration
- Nothing to configure. Site administrators can build menus at once.
- To let another role build menus, add the manageMenus permission (under site-admin) to it in Administration > Roles, together with publish: a menu reaches visitors when it is published from the screen.
- Guide: README.
4. Check it works
- As a site administrator, in jContent, Additional > Menus opens the screen: create a menu, add a few pages, Save menu, then Publish.
- In Page Builder, add the Menu component to a page, choose the menu in Menu, and its look in Layout > Select a view(horizontal bar by default, mega menu, vertical list, columns). Editors who may edit the page can add it.
- Publish the page: the menu shows on the site.
Upgrade
Upload the new versions the same way, the module first; Jahia stops the previous version and starts the new one. Uploading a version that is already installed again is skipped unless you force the update (Force update of module(s)).
Scripted install (administrators)
With Jahia's provisioning API, as a server administrator:
curl -u root:<password> https://<jahia>/modules/api/provisioning \ -F 'script=[{"installOrUpgradeBundle":"menu-manager-1.0.0.jar","autoStart":true},{"installOrUpgradeBundle":"menu-manager-views-1.0.0.tgz","autoStart":true},{"enable":"menu-manager","site":"<siteKey>"},{"enable":"menu-manager-views","site":"<siteKey>"}];type=application/json' \ -F file=@menu-manager-1.0.0.jar -F file=@menu-manager-views-1.0.0.tgz
FAQ
Where is the screen in jContent?
In the Additional accordion, entry Menus, on the sites where the module is enabled, for users who hold the manageMenuspermission (site administrators).
Does a menu follow the page tree?
Only where you ask it to: a page item with Include the page's subpages lists that page's subpages, up to the menu's depth, so new pages appear without editing the menu. Everything else is exactly what you built.
What do visitors see when a page is not published, or restricted?
Nothing: the item, and everything under it, is left out of the menu each visitor sees. The screen marks such items with a badge so you know.
How are menus translated?
Switch the language at the top of the screen and write the labels in it. An item without a label in a language shows its page's title in that language, then the label of the menu's fallback language (the site's default language unless you choose another in Menu settings).
Can I use it without classic-templates?
Yes. The Menu component goes into any area that accepts Jahia's navigation components or any droppable content, and its look follows the site's theme through CSS variables (--mnu-*).
MIT License. Full text: LICENSE.