category::tagcloud::tagcloud (public)
category::tagcloud::tagcloud -tree_id tree_id
Defined in packages/categories/tcl/tagcloud-procs.tcl
Generate a tag cloud for the categories in the given category tree.
- Switches:
- Options:
- -tree_id (required)
- -tree_id
- tree_id of the tree for which to generate the cloud.
- Returns:
- HTML fragment for the tag cloud.
- Author:
- Matthew Burke <matt-oacs@bluedino.net>
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- category_object_mapping
Source code: set html_fragment "<div class=\"tagcloud\">\n" set tag_list [category::tagcloud::get_tags -tree_id $tree_id] # now build the frag set weights [category::tagcloud::get_minmax_tagweights -tag_list $tag_list] # and what if category package isn't mounted at /category? foreach tag $tag_list { append html_fragment "<a href=\"/categories/categories-browse?tree_ids=$tree_id&category_ids=[lindex $tag 0]\" style=\"font-size: [category::tagcloud::scale_weight -weight [lindex $tag 1] -extremes $weights]px;\" class=\"tag\">[lindex $tag 2]</a>\n" } append html_fragment "</div>" return $html_fragmentXQL Not present: Generic, PostgreSQL, Oracle