category_tree::get_multirow (public)
category_tree::get_multirow [ -tree_id tree_id ] \ [ -subtree_id subtree_id ] [ -assign_single_p assign_single_p ] \ [ -require_category_p require_category_p ] \ [ -container_id container_id ] \ [ -category_counts category_counts ] [ -append ] \ [ -datasource datasource ]
Defined in packages/categories/tcl/category-trees-procs.tcl
get a multirow datasource for a given tree or for all trees mapped to a given container. datasource is: tree_id tree_name category_id category_name level pad deprecated_p count child_sum where:
Here is an example of how to use this in adp:
- mapped_p indicates the category_id was found in the list mapped_ids.
- child_sum is the naive sum of items mapped to children (may double count)
- count is the number of items mapped directly to the given category
- pad is a stupid hard coded pad for the tree (I think trees should use nested lists and css)
<multiple name="categories"> <h2>@categories.tree_name@</h2> <ul> <group column="tree_id"> <if @categories.count@ gt 0 or @categories.child_sum@ gt 0> <li>@categories.pad;noquote@<a href="@categories.category_id@">@categories.category_name@</a> <if @categories.count@ gt 0>(@categories.count@)</if></li> </if> </group> </multiple>
- Switches:
- -tree_id (optional)
- tree_id or container_id must be provided.
- -subtree_id (optional)
- -assign_single_p (optional, defaults to
"f"
)- -require_category_p (optional, defaults to
"f"
)- -container_id (optional)
- returns all mapped trees for the given container_id
- -category_counts (optional)
- list of category_id and counts {catid count cat count ... }
- -append (optional, boolean)
- -datasource (optional)
- the name of the datasource to create.
- Author:
- Jeff Davis davis@xarg.net
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- category_crud