Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

7 Producing on-line Help > 7.9 Including expandable sections in Help topics > 7.9.4 Configuring drop-down links > 7.9.4.5 Modifying code for drop-down links


7.9.4.5 Modifying code for drop-down links

You can redefine any of the built-in drop-down link macros by changing the default code that is assigned to the macro name. Each macro name serves as a keyword in your project configuration file; you change the definition by assigning replacement code to the macro name. When you assign code to a macro name in the configuration file, the entire setting must be all on one line, even if it does not look that way here.

Ordinarily you should not need to include any of the settings described in this section.

Link ID prefix

Because an ID used in JavaScript must start with a letter, by default Mif2Go prefixes the incremental value of the drop-down link ID with drop. To change the drop-down link ID prefix:

[DropDowns]

DropIDPrefix = drop

Link macros

To change the code for creating drop-down links, include the following settings to redefine the built-in macros:

[DropDowns]

; Default macros for link start/end:

DropLinkStart = <a class="<$DropClass>"\n <$DropLinkAttr>>

DropLinkAttr = href="javascript:doSection('<$$_DropID>');void 0;"

DropLinkEnd = </a>

If you use DropLinkStart, include CSS for the text to match its content; also see:§7.9.6 Providing CSS for drop-down links and blocks:

[DropDowns]

DropLinkParaStart = <p class="<$DropClass>">

DropLinkParaText = <$DropText>

DropLinkParaEnd = </p>

<$DropLinkStart> follows <$DropLinkParaStart>. If DropLinkType=Icon, both icons follow <$DropLinkStart>. Unless DropLinkType=Button, next come <$DropLinkParaText> then <$DropLinkEnd>.

Icon macros

To change the code for drop-down icons:

[DropDowns]

DropOpenIcon = <img\n src="<$DropOpenIconFile>" id="io<$$_DropID>"   style="border:0;" alt="<$DropOpenIconAlt>">

DropCloseIcon = <img\n src="<$DropCloseIconFile>" id="ic<$$_DropID>"   style="display:none;border:0;" alt="">\n

Button macros

To change the code for drop-down buttons:

[DropDowns]

DropButton = \n<button type="button" class="<$DropClass>" id=  "bu<$$_DropID>" <$DropButtonAttr>><$DropButtonOpenLabel></button>\n

DropButtonAttr = onclick="doSection('<$$_DropID>')"

Text macro

To change the code for fixed-text links:

[DropDowns]

DropLinkPara = <p class="<$DropClass>">   <$DropLinkStart><$DropText><$DropLinkEnd></p>



7 Producing on-line Help > 7.9 Including expandable sections in Help topics > 7.9.4 Configuring drop-down links > 7.9.4.5 Modifying code for drop-down links