xowiki::Page instproc www-popular-tags (public)
<instance of xowiki::Page> www-popular-tags
Defined in packages/xowiki/tcl/xowiki-www-procs.tcl
AJAX called function, returns an HTML snippet with the popular tags.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set package ::${:package_id} set limit [:query_parameter limit:int32 20] set weblog_page [$package get_parameter weblog_page:graph weblog] set href [$package pretty_link -parent_id [$package folder_id] $weblog_page]?summary=1 set entries [list] xo::dc foreach get_popular_tags [::xo::dc select -vars "count(*) as nr, tag" -from "xowiki_tags" -where "item_id = [ns_dbquotevalue ${:item_id}]" -groupby "tag" -orderby "nr" -limit $limit] { set label [ns_quotehtml "$tag ($nr)"] lappend entries "<a href='[ns_quotehtml $href&ptag=[ad_urlencode $tag]]'>$label</a>" } ns_return 200 text/html "<span class='popular-tags'>[_ xowiki.popular_tags_label]: [join $entries {, }]</span>" ad_script_abortXQL Not present: Generic, PostgreSQL, Oracle