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):
%3 test_adp_parse_tags adp_parse_tags (test acs-templating) template::icon template::icon test_adp_parse_tags->template::icon template::head::add_css template::head::add_css (public) template::icon->template::head::add_css template::iconset template::iconset (private) template::icon->template::iconset Class ::xowf::test_item::Answer_manager Class ::xowf::test_item::Answer_manager (public) Class ::xowf::test_item::Answer_manager->template::icon packages/acs-templating/tcl/tag-init.tcl packages/acs-templating/ tcl/tag-init.tcl packages/acs-templating/tcl/tag-init.tcl->template::icon xowf::test_item::Answer_manager instproc postprocess_question_html xowf::test_item::Answer_manager instproc postprocess_question_html (protected) xowf::test_item::Answer_manager instproc postprocess_question_html->template::icon

Testcases:
adp_parse_tags
[ show source ]
Show another procedure: