Forum OpenACS Development: Re: nesting and list-builder

Collapse
Posted by Malte Sussdorff on
If this is possible in your scope of work, could you implement it in a general way for listbuilder, giving it the column name of the parent_id as a clue. This way, you can call listbuilder and give it the parent_id and listbuilder automatically figures out which lines will be indented and how to sort the items accordingly. It might be nicer (and faster ?) to presort in Postgres, but maybe it is more convenient to do it in TCL. I'm pretty sure there already exist some algorithms to achieve this kind of sorting. This way you can just leave your queries as is (though they have to retrieve the parent_id) and listbuilder sorts them in TCL automatically for you (including multiple levels of trees). Another switch would be great for color schemes and from which level on to use the same color for all sublevels.