Ok, I've finished work on the navigation-rewrite topic branch. It now contains a significant rewrite of the whole navigation and dispatching system in weblocks, as well as a number of related improvements, that are only possible because of the rewrite. The tree may be viewed at http://github.com/jwr/weblocks-jwr/tree/navigation-rewrite
I will be merging this branch into my github weblocks-jwr branch soon -- I have been using it for a while and it works very well for me. All of my current work is based on it. Major features: -- navigation items can have URIs different from their names -- you can now have hidden navigation items -- you can render navigation content separately from the menu (teleport hack) -- generalized tree walking (see walk-widget-tree) -- tree walking now tracks depth (necessary for the next feature) -- ability to set the page title and breadcumbs name from anywhere in the tree -- breadcrumbs widget -- container and composite are gone, use (make-instance 'widget :children (list...)) -- root-composite is now root-widget -- dispatcher is gone, subclass selector and define get-widget-for-tokens -- *uri-tokens* is now an object -- you can't (setf widget-children) anymore, see set-children-of-type -- anyone who uses set-children-of-type can participate in flows as a parent -- new render-widget-children method for additional rendering flexibility Altogether, this let me implement things like pageable-list (a pageable list of widgets) or a 'commentable' mixin that makes some of my widgets commentable just by adding it to superclasses and defining three methods (get-comment-data, get-comment-count, make-comment). A commentable widget is one that displays its comments, and allows for adding and editing them. Also, I can finally have working multi-level navigation with hidden items. Apart from bug fixes, I consider this topic branch closed, e.g. no new features will go onto it. My current YUI work requires this branch anyway. Stephen, I went with a mutable-data approach to widget-children, instead of the functional approach you were suggesting. I do think your design is nicer, but I think it is much more difficult to debug and tough for newcomers. --J. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "weblocks" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/weblocks?hl=en -~----------~----~----~----~------~----~------~--~---
