Omni Systems, Inc. Mif2Go User's Guide, Version 55
> 19 Creating HTML links > 19.2 Specifying link appearance > 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:
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>
<a href="javascript:LinkTo('destination');">Some text</a>
To make the links look like this in HTML output:
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.