#80: Navigation Portlet
- Proposed by
- Jean-Paul Ladage
- Seconded by
- Joel Burton
- Proposal type
- Architecture
- Repository branch
- plip-80-navtree
- State
- completed
Motivation
The current implentation of the navigation tree is consuming a lot of resources because it is waking objects and has unnecessary complexity.
Proposal
Refactor the navtree-generating method by backporting the approach used in NavigationPortlets.
Implementation
NavigationPortlet has a far more efficient approach to building the navigation tree by using ExtendedPathIndex. But this product is currently part of PlonePortlets. The method that generates the tree will be inserted in PloneTool.py and the necessary changes in the catalog tool are added in a new setupNavTree method.
The following files are marked for deletion:
*StatelessTree
*StatelessTreeNav.py
The setupNavTreeStyleSheet method in StatelessTreeNav.py will be moved to Portal.py All options used in the current navtree stylesheet will available for migration purposes.
Deliverables
- A method for creating an ExtendedPathIndex for the path index.
- Install ExtendedPathIndex product in PloneTestCase.py
- Add a method in migration to substitute the path index and update the catalog
- Rewrite portlet_navigation.pt to call the new createNavTree method. Remove all legacy property handling code.
- add portlet_navigation_macro.pt which generates the tree recursively.
Progress log
during UI sprint
Participants
- Jean-Paul Ladage
- Joel Burton
Not that easy
Besides installing ExtendedPathIndex quite a number of things should be done to backport this to 2.0.5.
- Add new Properties in navtree_properties
- convert path index
- Add new methods in Portal.py for generating the tree
- Use the new templates
In short, not for rookies. sorry :(
portlet_navigation for a Folder
I'm using Plone 2.1 and LinguaPlone. I need to create a portlet like the portlet_navigation but only with the content of a specified folder, not the whole site content. In order to get the contents I need, I thought at this definition used in portlet_navigation:
python:here.plone_utils.createNavTree(here,sitemap=None)
and I thought to change it this way:
python:here.plone_utils.createNavTree(here.my_folder_id,sitemap=None)
but the result was unexpected: it doesn't show only the specified folder contents and using LinguaPlone, translations are not shown properly as default portlet_navigation does. How can I arrange my script? What should I use in createNavTree script parameters?
Integration into Plone 2.05
Hello
Is there any easy way to integrate the new navigation into plone 2.0.5?
If so could you shortly describe it?
Best regards
Dominik