Helper macro to build documentation links.
The following parameters are recognized:
Default title of document (to appear in body of text and default tool tip).
URL to jump to when user clicks (must be properly escaped).
If not blank, will be inserted in the body of text shown to the user, but not included in the default tool tip. NOTE: Quoting will be omitted in this case.
Allows one to override the default "tooltip" and "target" attributes. You may also specify any other <a> attributes you want here (other than "href" and "class").
This macro is used to form other macros (like @nstFaqLink()). It is intended for links to online documentation which you would like to appear in a consistent manner within the main body of text (typically used within paragraphs).
Example of using the macro:
@documentLink("@nstFaqTitle()","@nstFaqUrl()") @documentLink("@nstFaqTitle()","@nstFaqUrl()","check out the FAQ","@htmlAttr("title","Go check it out")@htmlAttr("style","font-size: 200%")")
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")
@documentLink("@nstFaqTitle()","@nstFaqUrl()") @documentLink("@nstFaqTitle()","@nstFaqUrl()","check out the FAQ","@htmlAttr("title","Go check it out")@htmlAttr("style","font-size: 200%")")
EOF
This macro is defined as:
<span@htmlAttr("style","white-space: nowrap;")><a @htmlAttr("class","documentRef")@ifEqual("@param(3)",," @htmlAttr("onmouseover","domTT_activate(this, event, 'content', unescape('@encodeFormParam("<span") @encodeFormParam("class=\"ttNote\">")Open@encodeFormParam("</span>") the @encodeFormParam("<span") @encodeFormParam("class=\"ttDocument\">")@param(0)@encodeFormParam("</span>") document at: @encodeFormParam("\"<span") @encodeFormParam("class=\"ttSite\">@param(1)</span>\"") in a new @encodeFormParam("<span") @encodeFormParam("class=\"ttNote\">")Tab@encodeFormParam("</span>") / @encodeFormParam("<span") @encodeFormParam("class=\"ttNote\">")Window@encodeFormParam("</span>").'), 'width', 580);") @htmlAttr("target","_blank")"," @param(3)") @htmlAttr("href","@param(1)")>@ifEqual("@param(2)","","\"@param(0)\"","@param(2)")</a></span>