Inserts ' NAME=\"VALUE\"' into output, but only if VALUE is non blank.
The following parameters are recognized:
The name of the attribute to define.
The value for the attribute to be defined. If omitted, then NO output will be produced.
This is intended to support the building of HTML attributes within a document (typically used by other macros).
Example of using the macro:
<input@htmlAttr("type","submit")@htmlAttr("value","Hello World")/>
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")
<input@htmlAttr("type","submit")@htmlAttr("value","Hello World")/>
EOF
This macro is defined as:
@ifEqual("@param(1)",,," @param(0)=\"@param(1)\"")