Class ::xowiki::includelet::tags (public)
::xowiki::IncludeletClass ::xowiki::includelet::tags
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tcl
Display specified tags.
- Testcases:
- No testcase defined.
Source code: namespace eval ::xowiki::includelet {} ::nsf::object::alloc ::xowiki::IncludeletClass ::xowiki::includelet::tags {set :__default_metaclass ::xotcl::Class set :__default_superclass ::xotcl::Object set :aggregating false set :cacheable false set :localized true set :personalized true} ::xowiki::includelet::tags instproc render {} { :get_parameters ::xo::Page requireCSS "/resources/acs-templating/lists.css" if {$popular} { set label [_ xowiki.popular_tags_label] set tag_type ptag set sql [::xo::dc select -vars "count(*) as nr,tag" -from xowiki_tags -where "package_id = :package_id" -groupby tag -orderby tag -limit $limit] } else { set label [_ xowiki.your_tags_label] set tag_type tag set user_id [::xo::cc user_id] set sql "select count(*) as nr,tag from xowiki_tags where user_id = :user_id and package_id = :package_id group by tag order by tag" } set entries [list] if {![info exists page]} { set page [::$package_id get_parameter weblog_page:graph] } set href [::$package_id package_url]tag/ ::xo::dc foreach get_tag_counts $sql { set q [list] if {$summary} {lappend q "summary=[ad_urlencode_query $summary]"} if {$popular} {lappend q "popular=[ad_urlencode_query $popular]"} set link $href$tag?[join $q &] lappend entries "[ns_quotehtml $tag] <a rel='tag' href='[ns_quotehtml $link]'>([ns_quotehtml $nr])</a>" #lappend entries "[ns_quotehtml $tag] <a rel='tag' href='[ns_quotehtml $link]'><span class='badge' style='font-size:75%'>[ns_quotehtml $nr]</span></a>" } return [expr {[llength $entries] > 0 ? "<h3>[ns_quotehtml $label]</h3> <blockquote>[join $entries {, }]</blockquote>\n" : ""}] } ::xowiki::includelet::tags instparametercmd parameter_declaration ::xowiki::includelet::tags instparametercmd title ::nsf::relation::set ::xowiki::includelet::tags superclass ::xowiki::Includelet ::nx::slotObj -container slot ::xowiki::includelet::tags ::xowiki::includelet::tags::slot eval {set :__parameter { {title "Tags"} {parameter_declaration { {-limit:integer 20} {-summary:boolean 0} {-popular:boolean 0} {-page} }} }} ::nsf::object::alloc ::xotcl::Attribute ::xowiki::includelet::tags::slot::title {set :accessor public set :configurable true set :convert false set :default Tags set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::tags set :incremental 0 set :manager ::xowiki::includelet::tags::slot::title set :methodname title set :multiplicity 1..1 set :name title set :parameterSpec {-title:substdefault Tags} set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init} ::nsf::object::alloc ::xotcl::Attribute ::xowiki::includelet::tags::slot::parameter_declaration {set :accessor public set :configurable true set :convert false set :default { {-limit:integer 20} {-summary:boolean 0} {-popular:boolean 0} {-page} } set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::tags set :incremental 0 set :manager ::xowiki::includelet::tags::slot::parameter_declaration set :methodname parameter_declaration set :multiplicity 1..1 set :name parameter_declaration set :parameterSpec {-parameter_declaration:substdefault { {-limit:integer 20} {-summary:boolean 0} {-popular:boolean 0} {-page} }} set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init}XQL Not present: Generic, PostgreSQL, Oracle