Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

19 Creating HTML links > 19.2 Specifying link appearance > 19.2.4 Specifying link properties with macros


19.2.4 Specifying link properties with macros

To include a macro in the href attribute of HTML links, assign the LinkSrc property to any paragraph formats that contain links you wish to modify:

[HTMLParaStyles]

ParaFmt = LinkSrc

To specify the macro code:

[ParaStyleLinkSrc]

ParaFmt = code for the href attribute value

You can include macro variable <$$_linksrc> in the macro to insert the default content of the href attribute.

For example, suppose you want to use JavaScript for all links that occur in Body paragraphs, changing the links from the default format:

<a href="destination">Some text</a>

to this format:

<a href="javascript:LinkTo('destination');">Some text</a>

To make the links look like this in HTML output:

[HTMLParaStyles]

Body = LinkSrc

[ParaStyleLinkSrc]

Body = javascript:LinkTo('<$$_linksrc>');

Macro variable <$$_linksrc> provides the original destination value for the href attribute. Mif2Go supplies the double quotes around the entire attribute value; do not include them in the macro definition. Any quote marks needed within the macro must be single quotes.

Macros are also helpful when you need more than one line of href attribute information, or when you want to use the same href attributes in many different configuration files. See §28 Working with macros.



19 Creating HTML links > 19.2 Specifying link appearance > 19.2.4 Specifying link properties with macros