Index: openacs-4/packages/xowiki/tcl/includelet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/includelet-procs.tcl,v diff -u -r1.153 -r1.154 --- openacs-4/packages/xowiki/tcl/includelet-procs.tcl 22 Jun 2010 07:35:48 -0000 1.153 +++ openacs-4/packages/xowiki/tcl/includelet-procs.tcl 22 Jun 2010 17:18:39 -0000 1.154 @@ -2181,14 +2181,20 @@ } set tree [::xowiki::Tree new -destroy_on_cleanup -orderby pos -id [my id]] + $tree array set open_node [my array get open_node] $tree add_pages -full $full -remove_levels $remove_levels \ -book_mode $book_mode -open_page $open_page -expand_all $expand_all \ + -owner [self] \ $pages set HTML [$tree render -style yuitree -js $js] return $HTML } + toc instproc parent_id {} { + [my set __including_page] parent_id + } + toc instproc render_list {{-full false} pages} { my get_parameters @@ -2204,8 +2210,10 @@ set allow_reorder [my page_reorder_check_allow -with_head_entries false $allow_reorder] } set tree [::xowiki::Tree new -destroy_on_cleanup -orderby pos -id [my id]] + $tree array set open_node [my array get open_node] $tree add_pages -full $full -remove_levels $remove_levels \ -book_mode $book_mode -open_page $open_page -expand_all $expand_all \ + -owner [self] \ $pages my page_reorder_init_vars -allow_reorder $allow_reorder js last_level ID min_level @@ -2215,6 +2223,11 @@ return $HTML } + # TODO: maybe we could generalize this and similar convenience + # methods on the includelet root class. + toc instproc parent_id {} { + [my set __including_page] parent_id + } toc instproc include_head_entries {} { my instvar style renderer Index: openacs-4/packages/xowiki/www/view-book-no-ajax.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/Attic/view-book-no-ajax.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/xowiki/www/view-book-no-ajax.tcl 17 Jun 2010 10:45:12 -0000 1.4 +++ openacs-4/packages/xowiki/www/view-book-no-ajax.tcl 22 Jun 2010 17:18:39 -0000 1.5 @@ -12,7 +12,7 @@ if {$count > 0} { set book_relpos [format %.2f%% [expr {100.0 * $p / $count}]] if {$p>1} {set book_prev_link [$package_id pretty_link -parent_id [$i parent_id] [$i page_name [expr {$p - 1}]]]} - if {$p<$count} {set book_next_link [$package_id pretty_link [$i -parent_id [$i parent_id] page_name [expr {$p + 1}]]]} + if {$p<$count} {set book_next_link [$package_id pretty_link -parent_id [$i parent_id] [$i page_name [expr {$p + 1}]]]} set page_title "

[$i current] $title

" } else { set book_relpos 0.0%