xowiki::YUIMenu instproc render (public)

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

Defined in packages/xowiki/tcl/yui-procs.tcl

http://developer.yahoo.com/yui/menu/

Partial Call Graph (max 5 caller/called nodes):
%3 html::div html::div html::script html::script html::t html::t html::ul html::ul security::csp::nonce security::csp::nonce (public) xowiki::YUIMenu instproc render xowiki::YUIMenu instproc render xowiki::YUIMenu instproc render->html::div xowiki::YUIMenu instproc render->html::script xowiki::YUIMenu instproc render->html::t xowiki::YUIMenu instproc render->html::ul xowiki::YUIMenu instproc render->security::csp::nonce

Testcases:
No testcase defined.
Source code:
append :CSSclass " yuimenu"
set :extrajs ""

# I want the menu to show up when JS is disabled
# This gets overridden by JS, so its only relevant for the non-JS version
#set :style "visibility: visible; position: relative;"

html::div [:get_attributes {CSSclass class} id style] {
  # Header
  html::t \n
  if {[info exists :header]} {
    html::div -class "hd" {
      html::t [:header]
    }
  }
  # Body
  html::t \n
  html::div -class "bd" {
    foreach group [:split_menu_groups [:children]] {
      html::ul -class yuiml {
        foreach menuitemlist $group {$menuitemlist render}
      }
    }
  }
  # Footer
  if {[info exists :footer]} {
    html::div -class "ft" {
      html::t [:footer]
    }
  }
  # Shadow
  if {[info exists :shadow]} {
    html::div -class "yui-menu-shadow" {}
  }
  # JavaScript
  # only "root-level" menus need JS
  # TODO: is this parent-check sufficient / future-safe?
  if {[info exists :__parent]} {
    #
    # propagate extrajs from rendering
    #
    #ns_log notice "### propagate extrajs <${:extrajs}> from [:info class] to [${:__parent} info class]"
    ${:__parent} append extrajs ${:extrajs}
  } else {
    html::script -nonce [security::csp::nonce] -type "text/javascript" {
      html::t "var [:js_name] = new YAHOO.widget.Menu(\"[:id]\", ${:configuration});"
      html::t "
                    [:js_name].render();
                    [:js_name].show();
                    ${:extrajs}
                "
    }
  }
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: