%3 ::xowiki::BootstrapNavbarDropdownMenu ::xowiki::BootstrapNavbarDropdownMenu render ::xowiki::Menu ::xowiki::Menu render ::xowiki::BootstrapNavbarDropdownMenu->::xowiki::Menu ::xowiki::YUIMenuItemList ::xowiki::YUIMenuItemList ::xowiki::YUIMenuItemList->::xowiki::Menu ::xowiki::BootstrapNavbar ::xowiki::BootstrapNavbar render ::xowiki::BootstrapNavbar->::xowiki::Menu ::xowiki::YUIMenu ::xowiki::YUIMenu render ::xowiki::YUIMenu->::xowiki::Menu ::xowiki::MenuComponent ::xowiki::MenuComponent ::xowiki::Menu->::xowiki::MenuComponent ::xo::tdom::Object ::xo::tdom::Object ::xowiki::MenuComponent->::xo::tdom::Object

Class ::xowiki::BootstrapNavbarDropdownMenu

::xowiki::BootstrapNavbarDropdownMenu[i] create ... \
           [ -brand (default "false") ] \
           [ -header header ] \
           [ -text text ]

Class Relations

  • class: ::xo::tdom::Class[i]
  • superclass: ::xowiki::Menu[i]
::xo::tdom::Class create ::xowiki::BootstrapNavbarDropdownMenu \
     -superclass ::xowiki::Menu

Methods (to be applied on instances)

  • render (scripted, public)

     <instance of xowiki::BootstrapNavbarDropdownMenu[i]> render

    doku

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_create_folder_with_page create_folder_with_page (test xowf) xowiki::BootstrapNavbarDropdownMenu instproc render xowiki::BootstrapNavbarDropdownMenu instproc render test_create_folder_with_page->xowiki::BootstrapNavbarDropdownMenu instproc render test_create_workflow_with_instance create_workflow_with_instance (test xowf) test_create_workflow_with_instance->xowiki::BootstrapNavbarDropdownMenu instproc render html::a html::a xowiki::BootstrapNavbarDropdownMenu instproc render->html::a html::li html::li xowiki::BootstrapNavbarDropdownMenu instproc render->html::li html::t html::t xowiki::BootstrapNavbarDropdownMenu instproc render->html::t html::ul html::ul xowiki::BootstrapNavbarDropdownMenu instproc render->html::ul

    Testcases:
    create_folder_with_page, create_workflow_with_instance
    # TODO: Add support for group-headers
    # get group header
    set group " "
    
    html::li -class "nav-item dropdown" {
      set class "nav-link dropdown-toggle"
      if {${:brand}} {
        lappend class "navbar-brand"
      }
      set data_attribute [expr {[::xowiki::CSS toolkit] eq "bootstrap5" ? "data-bs" : "data"}]
      html::a -href "\#" -class $class -$data_attribute-toggle "dropdown" {
        html::t ${:text}
      }
      html::ul -class "dropdown-menu" {
        foreach dropdownmenuitem [:children] {
          if {[$dropdownmenuitem set group] ne ""
              && [$dropdownmenuitem set group] ne $group
            } {
            if {$group ne " "} {
              html::li -class "divider dropdown-divider"
            }
            set group [$dropdownmenuitem set group]
          }
          $dropdownmenuitem render
        }
      }
    }