@collapsibleHeaderBegin(ID, [TITLE], [Hn], [INITSTATE], [ImgScale], [ANCHOR])

Inserts a header line with navigation AND ability to "collapse it".

The following parameters are recognized:

ID

The unique ID to associate with the header line (the area ID will be assigned: ID + "-area" and the icon will be assigned: ID + "-icon")

[TITLE]

The text to appear on the header line.

[Hn]

The header level to use (defaults to "h2").

[INITSTATE]

The initial "collapse" state. Pass "none" to initially hide, or "block" to initially show (any CSS "display" value is legal).

[ImgScale]

Fold / Header icon image scale as a real number. Used for smaller page layouts. Default: 1.0.

[ANCHOR]

An optional anchor point name for the collapsible header.

Example of using the macro:

@bashCgiOutBegin()
@collapsibleHeaderBegin("myid","My Information")
@p("This paragraph WILL be shown initially.")
@collapsibleHeaderEnd()

@collapsibleHeaderBegin("status","Current Status",,"none")
@p("This paragraph will not be shown initially.")
@collapsibleHeaderEnd()

@collapsibleHeaderBegin("info","Current Information",,"block",0.8)
@p("This paragraph WILL be shown initially using a compact page
section header format of 80%.")
@collapsibleHeaderEnd()
@bashCgiOutEnd()

Assuming the com.ccg.macros.at.All class is within your CLASSPATH and the config/html.at macros file has been generated (Hint: run make atmacros in the wui directory), a developer should be able to run the above example by copy/pasting from below:

[root@probe root]# java com.ccg.macros.at.All <<EOF
@include("config/html.at",,"d")

@bashCgiOutBegin()
@collapsibleHeaderBegin("myid","My Information")
@p("This paragraph WILL be shown initially.")
@collapsibleHeaderEnd()

@collapsibleHeaderBegin("status","Current Status",,"none")
@p("This paragraph will not be shown initially.")
@collapsibleHeaderEnd()

@collapsibleHeaderBegin("info","Current Information",,"block",0.8)
@p("This paragraph WILL be shown initially using a compact page
section header format of 80%.")
@collapsibleHeaderEnd()
@bashCgiOutEnd()

EOF

This macro is defined as:

@debug(5,"@param(1)")
@ifEqual("@param(5)",,,"<div@htmlAttr("id","@param(5)")></div>")
@javascriptBegin()
  @ifEqual("@param(5)","","","wuiNavHdAttach = document.getElementById("@param(5)");")
  setNavLinkHome("@topDir()/index.cgi","","@exitAnchor()");
  addCollapsibleHeader("@param(1)","@param(0)","@param(3)","@fnb("@param(2)","h2")","@imageDirUrl()/",null,@fnb("@param(4)","undefined"));

@define("wuiHtmlHeaderAnchor","@param(0)","now")
@javascriptEnd()
<div
  @htmlAttr("id","@param(0)-area")
  @htmlAttr("style","display: @fnb("@param(3)","block");")>