- MenuBars are now easier programmatically extensible (easier to maintain) - refactored code, reduced scatted definitions (all configurations at the same place) - unified templating: use body property @body.folderHTML@ instead of @folderhtml@
From the former API calls only "update_items" has changed, all existing configurations (i.e. via folders or package parameter) should continue to work.
== Changes:
One can now extend menubars via menu entry definition {config -use YOURCONFIG -class YOURCLASS}
in two directions: a) subclassing define your own menubar class YOURCLASS, which should be a subclass of ::xowiki::MenuBar
b) provide your own configuration method to provide a more tailored configuration. This is performed by defining a method "config=YOURCONFIG" for ::xowiki::MenuBar
The latter method is used for test-items, which can define a test item folder by using
See below for the definition of the "test-items" configuration method, which is based on the default definitions. In general, the definition in this method can be performed via menu-entries (same syntax as in other menu entries) or via the MenuBar API (e.g. calling ":add_menu_item ...").
All configurations follow the following definition order where later entries can refine earlier entries: - package level: package parameter ExtraMenuEntries - configuration method: use standard or tailored confguration methods - per-folder definition: content of the extra_menu_entries
Note that the menu entry definition language supports as well adding/clearing menus, etc., so almost everything can be refined.
I've noticed that the tlf* code has several scattered menu definitions, which are as well done in every case differently.
By these definition one can define e.g. a learning-app folder (where "New" can be used to define new app folders), and the app folders can provide their own "New" entries, e.g. for clickers and others. E.g. For "clickers" there is already on non-oo definition to achieve similar things (which should be altered to the new method), but on other places, there are some hard-coded definitions for root folders, etc. The menubars of the learning-apps should be made this way more consistent with the rest (e.g. using "New", supporting "table of contents" for clipboard interactions, etc.)