style-procs.tcl

Template style handling

Location:
packages/acs-templating/tcl/style-procs.tcl
Author:
Gustaf Neumann

Procedures in this file

Detailed information

template::icon (private)

 template::icon -name name [ -alt alt ] [ -class class ] \
    [ -iconset iconset ] [ -style style ] [ -title title ] \
    [ -invisible ]

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

template::icon::name (public)

 template::icon::name [ -iconset iconset ] name

Return for the provided generic name the name in the specified or current iconset the name mapping. This function is necessary in boundary cases, where e.g. a display_template passes the generic name of the icon via template variables which have to be

Switches:
-iconset (optional)
Parameters:
name (required)
Returns:
mapped icon name or the passed in generic name

Partial Call Graph (max 5 caller/called nodes):
%3 packages/file-storage/lib/folder-links.tcl packages/file-storage/ lib/folder-links.tcl template::icon::name template::icon::name packages/file-storage/lib/folder-links.tcl->template::icon::name packages/file-storage/www/folder-chunk.tcl packages/file-storage/ www/folder-chunk.tcl packages/file-storage/www/folder-chunk.tcl->template::icon::name template::iconset template::iconset (private) template::icon::name->template::iconset

Testcases:
No testcase defined.

template::iconset (private)

 template::iconset [ -subsite_id subsite_id ]

Return the configured or derived icon set. Potential results are "classic" (old-style gif/png images), "glyphicons" (Part of Bootstrap 3), "fa-icons" (usable for all themes), and "bootstrap-icons" (usable for all themes).

Switches:
-subsite_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 Object ::template::CSS Object ::template::CSS (public) template::iconset template::iconset Object ::template::CSS->template::iconset packages/acs-templating/www/sitewide-admin/index.tcl packages/acs-templating/ www/sitewide-admin/index.tcl packages/acs-templating/www/sitewide-admin/index.tcl->template::iconset packages/bootstrap-icons/www/sitewide-admin/sample.tcl packages/bootstrap-icons/ www/sitewide-admin/sample.tcl packages/bootstrap-icons/www/sitewide-admin/sample.tcl->template::iconset packages/fa-icons/www/sitewide-admin/sample.tcl packages/fa-icons/ www/sitewide-admin/sample.tcl packages/fa-icons/www/sitewide-admin/sample.tcl->template::iconset template::CSS proc initialize template::CSS proc initialize (public) template::CSS proc initialize->template::iconset ad_conn ad_conn (public) template::iconset->ad_conn apm_package_enabled_p apm_package_enabled_p (public) template::iconset->apm_package_enabled_p parameter::get parameter::get (public) template::iconset->parameter::get template::toolkit template::toolkit (private) template::iconset->template::toolkit

Testcases:
No testcase defined.

template::toolkit (private)

 template::toolkit [ -subsite_id subsite_id ]

Return the CSS toolkit or empty the current or given subsite. Potential result values are "" (undetermined) "bootstrap" (for Bootstrap 3), "bootstrap5" (for Bootstrap 5), or "w3css".

Switches:
-subsite_id (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 Object ::template::CSS Object ::template::CSS (public) template::toolkit template::toolkit Object ::template::CSS->template::toolkit packages/acs-templating/tcl/tag-init.tcl packages/acs-templating/ tcl/tag-init.tcl packages/acs-templating/tcl/tag-init.tcl->template::toolkit packages/acs-templating/www/sitewide-admin/index.tcl packages/acs-templating/ www/sitewide-admin/index.tcl packages/acs-templating/www/sitewide-admin/index.tcl->template::toolkit template::CSS proc class template::CSS proc class (public) template::CSS proc class->template::toolkit template::iconset template::iconset (private) template::iconset->template::toolkit ad_conn ad_conn (public) template::toolkit->ad_conn parameter::get parameter::get (public) template::toolkit->parameter::get subsite::get_theme subsite::get_theme (public) template::toolkit->subsite::get_theme

Testcases:
No testcase defined.
[ show source ]