Class ::xowiki::TreeRenderer=bootstrap3-folders

::xowiki::TreeRenderer=bootstrap3-folders[i] create ...

Class Relations

  • class: ::xowiki::TreeRenderer[i]
  • superclass: ::xowiki::TreeRenderer=bootstrap3[i]
::xowiki::TreeRenderer create ::xowiki::TreeRenderer=bootstrap3-folders \
     -superclass ::xowiki::TreeRenderer=bootstrap3

Methods (to be applied on the object)

  • render (scripted)

    set jsTree [string trimright [next", \n"]
    set id [$tree id]
    set options [list "enableLinks: true"]
    # see list of possible icons: https://github.com/jonmiles/bootstrap-treeview
    if {[::template::CSS toolkit] eq "bootstrap5"} {
      lappend options  "expandIcon: 'glyphicon glyphicon-none'"  "collapseIcon: 'bi bi-folder2-open'"
      #"expandIcon: 'bi bi-folder'"
    } else {
      lappend options  "expandIcon: 'glyphicon glyphicon-none'"  "collapseIcon: 'glyphicon glyphicon-folder-open'"
    }
    template::add_body_script -script "\n\$('#$id').treeview({data: \[$jsTree\], [join $options ,] });"
    return "<div id='$id'></div>"