Class ::xowiki::includelet::my-refers (public)
::xowiki::IncludeletClass ::xowiki::includelet::my-refers
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tcl
List the pages which are referred to the current page.
- Testcases:
- No testcase defined.
Source code: namespace eval ::xowiki::includelet {} ::nsf::object::alloc ::xowiki::IncludeletClass ::xowiki::includelet::my-refers {set :__default_metaclass ::xotcl::Class set :__default_superclass ::xotcl::Object set :aggregating false set :cacheable false set :localized true set :personalized true} ::xowiki::includelet::my-refers instproc render {} { :get_parameters set item_id [${:__including_page} item_id] set refs [list] ::xo::dc foreach get_refers "SELECT DISTINCT reference,ci.name,ci.parent_id,o.package_id as pid from xowiki_references,cr_items ci,acs_objects o where page = :item_id and ci.item_id = reference and ci.item_id = o.object_id" { if {$pid eq ""} { # # In versions begore oacs 5.2, the following query returns # empty. # set pid [::xo::dc get_value 5.2 { select package_id from cr_folders where folder_id = :parent_id }] } if {$pid ne ""} { ::xowiki::Package require $pid lappend refs "<a href='[ns_quotehtml [::$pid pretty_link -parent_id $parent_id $name]]'>[ns_quotehtml $name]</a>" } } set references [join $refs ", "] array set lang {found "" undefined ""} foreach i [${:__including_page} array names lang_links] { set lang($i) [join [${:__including_page} set lang_links($i)] ", "] } append references " " $lang(found) set result "" if {$references ne " "} { append result "#xowiki.references_of_label# $references" } if {$lang(undefined) ne ""} { append result "#xowiki.create_this_page_in_language# $lang(undefined)" } return $result } ::xowiki::includelet::my-refers instparametercmd __decoration ::nsf::relation::set ::xowiki::includelet::my-refers superclass ::xowiki::Includelet ::nx::slotObj -container slot ::xowiki::includelet::my-refers ::xowiki::includelet::my-refers::slot eval {set :__parameter {{__decoration none}}} ::nsf::object::alloc ::xotcl::Attribute ::xowiki::includelet::my-refers::slot::__decoration {set :accessor public set :configurable true set :convert false set :default none set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::my-refers set :incremental 0 set :manager ::xowiki::includelet::my-refers::slot::__decoration set :methodname __decoration set :multiplicity 1..1 set :name __decoration set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init}XQL Not present: Generic, PostgreSQL, Oracle