- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::TreeRenderer=list
::xowiki::TreeRenderer=list create ...
Class Relations
- class: ::xowiki::TreeRenderer
- superclass: ::xotcl::Object
- subclass: ::xowiki::TreeRenderer=yuitree, ::xowiki::TreeRenderer=mktree, ::xowiki::TreeRenderer=samplemenu, ::xowiki::TreeRenderer=sections, ::xowiki::TreeRenderer=bootstrap3horizontal, ::xowiki::TreeRenderer=listdnd
::xowiki::TreeRenderer create ::xowiki::TreeRenderer=list \ -superclass ::xotcl::ObjectMethods (to be applied on the object)
include_head_entries (scripted)
# In the general case, we have nothing to include. More # specialized renders could provide their head entries.render (scripted)
set CSSclass [:get_property $properties CSSclass_ul [:get_property $properties CSSclass_top_ul]] set my_ul_class [expr {$CSSclass ne "" ? "class='$CSSclass' " : ""}] return "<ul ${my_ul_class}id='[$tree id]'>[next]</ul>"Methods (to be applied on instances)
render_item (scripted)
$item instvar title href set prefix [$item set prefix] set suffix [$item set suffix] if {![$item exists encoded(prefix)]} {set prefix [::xowiki::Includelet html_encode $prefix]} if {![$item exists encoded(suffix)]} {set suffix [::xowiki::Includelet html_encode $suffix]} append entry $prefix "<a href='[ns_quotehtml $href]'>" [::xowiki::Includelet html_encode $title] "</a>" $suffix if {$highlight} { return "<li class='liItem'><b>$entry</b></li>\n" } else { return "<li class='liItem'>$entry</li>\n" }render_node (scripted)
#:msg "[:label] [:expanded]" set cl [lindex [:info precedence] 0] set o_atts [lindex [$cl li_expanded_atts] [expr {${:expanded} ? 0 : 1}]] set h_atts [lindex [$cl highlight_atts] [expr {${:highlight} ? 0 : 1}]] set u_atts "" if {[info exists :li_id]} {append o_atts " id='${:li_id}'"} if {[info exists :li_atts]} {append o_atts " ${:li_atts}"} if {[info exists :ul_id]} {append u_atts " id='${:ul_id}'"} if {[info exists :ul_atts]} {append u_atts " ${:ul_atts}"} if {[info exists :ul_class]} {append u_atts " class='${:ul_class}'"} set label [::xowiki::Includelet html_encode [:label]] if {[info exists :count]} { set entry "$label <a href='[ns_quotehtml [:href]]'>([:count])</a>" } else { if {${:href} ne ""} { set entry "<a href='[ns_quotehtml [:href]]'>[ns_quotehtml $label]</a>" } else { set entry ${:label} } } if {$cat_content ne ""} { set content "\n<ul $u_atts>\n$cat_content</ul>" if {[$cl exists subtree_wrapper_class]} { set content "\n<div class='[$cl subtree_wrapper_class]'>$content</div>\n" } } else { set content "" } return "<li $o_atts><span $h_atts>${:prefix} $entry</span>$content</li>"
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables