- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::includelet::my-references
::xowiki::includelet::my-references create ... \List the pages which are referring to the current page.
[ -__decoration (default "none") ]
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tcl
Class Relations
::xowiki::IncludeletClass create ::xowiki::includelet::my-references \ -superclass ::xowiki::IncludeletMethods (to be applied on instances)
__decoration (setter)
render (scripted)
:get_parameters set item_id [${:__including_page} item_id] set refs [list] # The same image might be linked both, as img or file on one page, # so we need DISTINCT. xo::dc foreach -prepare integer get_references { SELECT DISTINCT page,ci.name,ci.parent_id,o.package_id as pid from xowiki_references,cr_items ci,acs_objects o where reference = :item_id and ci.item_id = page and ci.item_id = o.object_id } { if {$pid eq ""} { # # In versions before 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_label# $references" } if {$lang(undefined) ne ""} { append result "#xowiki.create_this_page_in_language# $lang(undefined)" } return $result
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables