Concepts ๐ง #
Inheritance ๐งฌ#
The menu in effect is the nearest ancestor with a configured menu.
An unset field (
None) means โinheritโ; the search continues upward.An explicitly saved empty menu means โopt outโ; the search stops and the viewlet renders nothing.
If no ancestor configures a menu, the viewlet renders nothing.
There is no fallback to Ploneโs default main navigation.
This lets the site root define a site-wide menu, while a section can override it or opt out.
Link resolution and permissions ๐#
Internal links store the targetโs raw UID. At render time the UID is looked up
through the catalog and checked against the current userโs View permission.
An inaccessible or deleted internal link is omitted.
A folder whose visible children are all omitted is omitted too.
External links are always rendered.
Rendering ๐จ#
A viewlet subclasses Ploneโs GlobalSectionsViewlet and replaces the
plone.global_sections viewlet. It preserves the Barceloneta markup contract:
ul#portal-globalnavwithnavbar-nav;li.nav-itemanda.nav-link;has_subtree,dropdown, and the mobileopenerinput/label pair;pat-navigationmarkerfor the active/in-path behavior.
Storage ๐พ#
The menu is a native dict in a plone.schema.JSONField. Internal targets are
also registered with plone.app.linkintegrity when the menu is saved, so
deleting a referenced target shows Ploneโs standard warning. External URLs and
links to the Plone Site root itself are not tracked. Linkintegrity relations
are created on the next save; existing menus are not backfilled.