template::icon (private)
template::icon -name name [ -alt alt ] [ -class class ] \ [ -iconset iconset ] [ -style style ] [ -title title ] \ [ -invisible ]
Defined in packages/acs-templating/tcl/style-procs.tcl
Return a dict containing the HTML rendering and a potentially needed command for the ADP code. The latter are necessary for e.g. style loading. The target icon can be (1) a font glyph, (2) an image or (3) just a text. Method (1) is used for glyphicons and bootstrap icons, which is signaled by a value in the icon::map starting with a plain character. When the value starts with a slash "/", then an image will be used. When the name has no graphical counterpart (variant 3), this is signaled via an empty string. In this case, the resulting replacement will be the value of "alt" in text form. The configuration of this method is performed via the Tcl dict ::template::icon::map, which is set in tag-init.tcl
- Switches:
- -name (required)
- -alt (optional)
- used in classic images. When not specified, use 'title' attribute
- -class (optional)
- -iconset (optional)
- force isage of this icon set
- -style (optional)
- -title (optional)
- -invisible (optional, boolean, defaults to
"f"
)- Returns:
- dict containing 'HTML' and 'cmd'
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- adp_parse_tags