-
-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Since the removal of navtree_depth
in 7e2178d, it is way more difficult to override it.
For example, we have a use case for so called "site sections", where the navigation tree depth needs to be different than everywhere else in the site.
Since it is now a direct global settings call, we cannot just subclass GlobalSectionsViewlet
locally, as we did before.
Is there a performance reason for this method removal ? or maybe we could have just put a @memoize
decorator and keep it ?
Our code was :
class SectionNavigationViewlet(GlobalSectionsViewlet):
@property
@memoize
def navtree_depth(self):
return self.section_root.menu_depth
Now, to do the same, we have to override the enormous navtree
function (:zany_face:) or make a proxy class for navigation settings (which we did).