%3 ::xowiki::BootstrapNavbarDropdownMenu ::xowiki::BootstrapNavbarDropdownMenu render ::xowiki::Menu ::xowiki::Menu render ::xowiki::BootstrapNavbarDropdownMenu->::xowiki::Menu ::xowiki::YUIMenuItemList ::xowiki::YUIMenuItemList render ::xowiki::YUIMenuItemList->::xowiki::Menu ::xowiki::BootstrapNavbar ::xowiki::BootstrapNavbar init render ::xowiki::BootstrapNavbar->::xowiki::Menu ::xowiki::YUIMenu ::xowiki::YUIMenu init render split_menu_groups ::xowiki::YUIMenu->::xowiki::Menu ::xowiki::MenuComponent ::xowiki::MenuComponent html_id js_name ::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 ]

Defined in

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)

  • brand (setter)

  • header (setter)

  • render (scripted, public)

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

    doku

    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 {[::template::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
        }
      }
    }
  • text (setter)