Christopher Petrilli wrote:
A'hoy! I knew Michel was up to something, my ears hurt... Seriously though, I think that there are some elegant ways to solve this. If only there were "cascading menus" in HTML ;-) [snip]
But there are -- check out the optgroup tag (http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.6). This tag has, afaik, been since at least the HTML 3 draft, although it is not rendered ideally by browsers such as IE. (IE renders everything as a flat list -- too bad.) For example: <select name="ObjectToInsert"> <optgroup label="Zope"> <option label="Folder" value="...">Folder</option> <option label="File" value="...">File</option> </optgroup> </select> To enforce strict structures in the object list, I suggest using dot paths: eg., "Zope.Builtin.Folder", "Vendor.DigitalCreations.SQLMethod", etc. This permits sorting, and makes it possible to organize items into a hierarchical tree structure. Maybe the Products folder could be organized this way, too, rather than the flat structure we have today: Products/Zope/Builtin/, Vendor/DigitalCreations/, etc. -- Zope could glean the dot path from the physical installation path, simple as that. This scheme obviates duplicate identifiers, too: If I write a product called MyProduct, its identifier will be made unambiguious by the fact that it's installed into Products/AlexanderStaubo/MyProduct -- avoiding possible conflict with another MyProduct. Alexander Staubo http://www.mop.no/~alex/ mailto:redhand@mop.no