Class ::xowiki::includelet::rss-client

::xowiki::includelet::rss-client[i] create ... \
           [ -parameter_declaration (default " {-url:required} {-max_entries:integer "15"} ") ] \
           [ -title (default "#xowiki.rss_client#") ]

Include RSS content
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tcl

Class Relations

  • class: ::xowiki::IncludeletClass[i]
  • superclass: ::xowiki::Includelet[i]
::xowiki::IncludeletClass create ::xowiki::includelet::rss-client \
     -superclass ::xowiki::Includelet

Methods (to be applied on instances)

  • initialize (scripted)

    :get_parameters
    set :feed [::xowiki::RSS-client new -url $url -destroy_on_cleanup]
    if {[info commands [${:feed} channel]] ne ""} {
      :title [ [${:feed} channel] title]
    }
  • parameter_declaration (setter)

  • render (scripted)

    :get_parameters
    if {[info commands [${:feed} channel]] eq ""} {
      set detail ""
      if {[${:feed} exists errorMessage]} {set detail \n[${:feed} set errorMessage]}
      return "No data available from $url<br>[ns_quotehtml $detail]"
    } else {
      set channel [${:feed} channel]
      #set html "<H1>[ns_quotehtml [$channel title]]</H1>"
      set html "<ul>\n"
      set i 0
      foreach item [ ${:feed} items ] {
        append html "<li><b>[ns_quotehtml [$item title]]</b><br> [ns_quotehtml [$item description]] <a href='[ns_quotehtml [$item link]]'>#xowiki.weblog-more#</a>\n"
        if {[incr i] >= $max_entries} break
      }
      append html "</ul>\n"
      return $html
    }
  • title (setter)