I'm working on adding categories support to file-storage, and while figuring out how to add a category selection list to the file-add form, I stumbled across some code in 'project-manager' that did what I wanted, see below:
if {![empty_string_p [category_tree::get_mapped_trees $package_id]]} {
ad_form -extend -form {
{category_ids:integer(category),multiple,optional {label "Categories"}
{html {size 7}} {value {}}
}
This works. No problem there. And I mostly get what's going on. However where does that 'category_ids' variable (?) come from?
'get_mapped_trees' does not seem to set it or return it. The only place where it seems to be set is in 'categories::get_categories' but that is called nowhere in my code (at least not that I'm aware of).
BTW: the example code in the package developers docu does not seem to give the desired result (the result from that code being an empty select box with a single character 'f' as label). Or I must have done some *really* stupid things while adapting the code for my case, but ...
I'd really appreciate some light on this issue.
Thanks in advance,
JvD