xowiki::includelet::toc instproc render

 <instance of xowiki::includelet::toc[i]> render

Defined in

Testcases:
includelet_toc, xowiki
Source code:
:get_parameters

if {![info exists :id]} {
  set :id [::xowiki::Includelet html_id [self]]
}
if {[info exists category_id]} {
  set :category_id $category_id
}

#
# Collect the pages which are either children of the page, or
# children of the parent of the page depending on "folder_mode".
#
set pages [:build_toc $package_id $locale $source $range]

#foreach p [$pages children] {
#  ns_log notice "... [$p set page_order] [$p set name]"
#}

#
# Build the general navigation structure using associative arrays
#
:build_navigation $pages
#
# Call a render on the created structure
#
if {[nsf::is object ::__xowiki__MenuBar] && ${:include_in_foldertree}} {
  ::__xowiki__MenuBar additional_sub_menu -kind folder -pages $pages -owner [self]
}
#
# TODO: We should call here the appropriate tree-renderer instead
# of the toc-specific renderers, but first we have to check, if
# these are fully feature-compatible.
#
#:log "=== toc render with <${:renderer}> treerenderer ${:use_tree_renderer} list_mode <${:list_mode}>"
if {${:renderer} eq "none"} {
} elseif {${:use_tree_renderer}} {
  return [:render_tree -full 1 $pages]
} elseif {${:list_mode}} {
  return [:render_list $pages]
} else {
  return [:render_yui_list -full true $pages]
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: