• Publicity: Public Only All

head-procs.tcl

The template::head::* API manipulates the head section of the document that will be returned to the users client. Packages should use this API to add package specific javascripts, CSS, link tags and meta tags to the HTML document.

Location:
packages/acs-templating/tcl/head-procs.tcl
Created:
2007-05-18
Author:
Lee Denison <lee@xarg.co.uk>

Procedures in this file

Detailed information

template::add_body_handler (public)

 template::add_body_handler -event event -script script \
    [ -identifier identifier ]

Adds JavaScript code to an event handler in the body tag. Several JavaScript code blocks may be assigned to each handler by subsequent calls to template::add_body_handler.

If your script may only be added once you may supply an identifier. Subsequent calls to template::add_body_handler with the same identifier will replace your script rather than appending to it.

event may be one of:

  • onload
  • onunload
  • onclick
  • ondblclick
  • onmousedown
  • onmouseup
  • onmouseover
  • onmousemove
  • onmouseout
  • onkeypress
  • onkeydown
  • onkeyup

Switches:
-event
(required)
the event during which the supplied script should be executed
-script
(required)
the JavaScript code to execute
-identifier
(defaults to "anonymous") (optional)
a name, if supplied, used to ensure this JavaScript code is only added to the handler once

Partial Call Graph (max 5 caller/called nodes):
%3 test_templates_and_scripts templates_and_scripts (test acs-templating) template::add_body_handler template::add_body_handler test_templates_and_scripts->template::add_body_handler Class ::xo::lti::LTI Class ::xo::lti::LTI (public) Class ::xo::lti::LTI->template::add_body_handler packages/acs-templating/www/scripts/xinha/attach-file.tcl packages/acs-templating/ www/scripts/xinha/attach-file.tcl packages/acs-templating/www/scripts/xinha/attach-file.tcl->template::add_body_handler packages/acs-templating/www/scripts/xinha/attach-image.tcl packages/acs-templating/ www/scripts/xinha/attach-image.tcl packages/acs-templating/www/scripts/xinha/attach-image.tcl->template::add_body_handler packages/calendar/www/cal-item-new.tcl packages/calendar/ www/cal-item-new.tcl packages/calendar/www/cal-item-new.tcl->template::add_body_handler packages/forums/lib/message/row2.tcl packages/forums/ lib/message/row2.tcl packages/forums/lib/message/row2.tcl->template::add_body_handler

Testcases:
templates_and_scripts

template::add_body_script (public)

 template::add_body_script [ -async ] [ -charset charset ] \
    [ -crossorigin crossorigin ] [ -defer ] [ -integrity integrity ] \
    [ -script script ] [ -src src ] [ -type type ]

Add a script to the start of the body section of the document to be returned to the users client. You must supply either src or script.

Switches:
-async
(boolean) (optional)
whether execution of the script should be executed asynchronously as soon as it is available
-charset
(optional)
the charset attribute of the script tag, i.e. the character set of the script if it differs from the main document
-crossorigin
(optional)
Enumerated attribute to indicate whether CORS (Cross-Origin Resource Sharing) should be used
-defer
(boolean) (optional)
whether execution of the script should be deferred until after the page has been loaded
-integrity
(optional)
provide hash values for W3C Subresource Integrity recommendation
-script
(optional)
the inline script for the body of the script tag. This parameter will be ignored if a value has been supplied for src
-src
(optional)
the src attribute of the script tag, i.e. the source url of the script
-type
(defaults to "text/javascript") (optional)
the type attribute of the script tag, e.g. 'text/javascript'

Partial Call Graph (max 5 caller/called nodes):
%3 test_templates_and_scripts templates_and_scripts (test acs-templating) template::add_body_script template::add_body_script test_templates_and_scripts->template::add_body_script test_xowiki_test_cases xowiki_test_cases (test xowiki) test_xowiki_test_cases->template::add_body_script security::csp::require security::csp::require (public) template::add_body_script->security::csp::require template::head::require_csp template::head::require_csp (private) template::add_body_script->template::head::require_csp Class ::xowf::test_item::Answer_manager Class ::xowf::test_item::Answer_manager (public) Class ::xowf::test_item::Answer_manager->template::add_body_script Class ::xowf::test_item::Question_manager Class ::xowf::test_item::Question_manager (public) Class ::xowf::test_item::Question_manager->template::add_body_script Class ::xowiki::formfield::FormField Class ::xowiki::formfield::FormField (public) Class ::xowiki::formfield::FormField->template::add_body_script Class ::xowiki::includelet::personal-notification-messages Class ::xowiki::includelet::personal-notification-messages (public) Class ::xowiki::includelet::personal-notification-messages->template::add_body_script ad_html_text_convert ad_html_text_convert (public) ad_html_text_convert->template::add_body_script

Testcases:
templates_and_scripts, xowiki_test_cases

template::add_confirm_handler (public)

 template::add_confirm_handler [ -event event ] [ -message message ] \
    [ -CSSclass CSSclass ] [ -id id ] [ -selector selector ] \
    [ -formfield formfield ]

Register an event handler for confirmation dialogs for elements either with a specified ID, CSS class, a formfield targeted by form id and field name or a CSS selector.

Switches:
-event
(defaults to "click") (optional)
register confirm handler for this type of event
-message
(defaults to "Are you sure?") (optional)
Message to be displayed in the confirmation dialog. If the message looks like a message key (starting and ending with a hash sign) it is treated as a message key
-CSSclass
(defaults to "acs-confirm") (optional)
register confirm handler for this CSS class
-id
(optional)
register confirm handler for this HTML ID
-selector
(optional)
register confirm handler for elements identified by this CSS selector. When a CSS selector contains double and single quotes, we won't add any of those around the selector automatically. Instead, the user must specify them explicitly, for instance like this: ... -selector {'[name="o\'hara"]'}. If the selector does not contain any single or double quotes, we can let the user omit them, as for the case of a simple tag name selector: ... -selector "li". Quotes can also be omitted if the selector contains only one kind of them, like ... -selector {[data-property='value']} or ... -selector {[data-property="value"]}
-formfield
(optional)
register confirm handler for this formfield, specified in a list of two elements in the form { form_id field_name }
Author:
Gustaf Neumann

Partial Call Graph (max 5 caller/called nodes):
%3 test_templates_and_scripts templates_and_scripts (test acs-templating) template::add_confirm_handler template::add_confirm_handler test_templates_and_scripts->template::add_confirm_handler _ _ (public) template::add_confirm_handler->_ Class ::Generic::List Class ::Generic::List (public) Class ::Generic::List->template::add_confirm_handler packages/acs-admin/www/auth/authority.tcl packages/acs-admin/ www/auth/authority.tcl packages/acs-admin/www/auth/authority.tcl->template::add_confirm_handler packages/acs-admin/www/auth/index.tcl packages/acs-admin/ www/auth/index.tcl packages/acs-admin/www/auth/index.tcl->template::add_confirm_handler packages/acs-automated-testing/www/server.tcl packages/acs-automated-testing/ www/server.tcl packages/acs-automated-testing/www/server.tcl->template::add_confirm_handler packages/acs-lang/www/admin/index.tcl packages/acs-lang/ www/admin/index.tcl packages/acs-lang/www/admin/index.tcl->template::add_confirm_handler

Testcases:
templates_and_scripts

template::add_event_listener (public)

 template::add_event_listener [ -event event ] [ -CSSclass CSSclass ] \
    [ -id id ] [ -formfield formfield ] [ -selector selector ] \
    [ -usecapture ] [ -preventdefault ] -script script

Register an event handler for elements. The affected elements can be specified in different ways, which will be checked in the following order of precedence: id, formfield, selector and CSSclass. Normally one needs to provide only one kind of specification.

Switches:
-event
(defaults to "click") (optional)
register handler for this type of event
-CSSclass
(defaults to "acs-listen") (optional)
register handler for this CSS class
-id
(optional)
register handler for this HTML ID
-formfield
(optional)
register handler for this formfield, specified in a list of two elements in the form { form_id field_name }
-selector
(optional)
register handler for elements identified by this CSS selector. When a CSS selector contains double and single quotes, we won't add any of those around the selector automatically. Instead, the user must specify them explicitly, for instance like this: ... -selector {'[name="o\'hara"]'}. If the selector does not contain any single or double quotes, we can let the user omit them, as for the case of a simple tag name selector: ... -selector "li". Quotes can also be omitted if the selector contains only one kind of them, like ... -selector {[data-property='value']} or ... -selector {[data-property="value"]}
-usecapture
(boolean) (defaults to "false") (optional)
indicating whether event will be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree.
-preventdefault
(boolean) (defaults to "true") (optional)
this option can the used prevent default click handling
-script
(required)
Author:
Gustaf Neumann

Partial Call Graph (max 5 caller/called nodes):
%3 test_templates_and_scripts templates_and_scripts (test acs-templating) template::add_event_listener template::add_event_listener test_templates_and_scripts->template::add_event_listener template::add_body_script template::add_body_script (public) template::add_event_listener->template::add_body_script Class ::xo::Table::BootstrapTableRenderer::AnchorField Class ::xo::Table::BootstrapTableRenderer::AnchorField (public) Class ::xo::Table::BootstrapTableRenderer::AnchorField->template::add_event_listener Class ::xowf::test_item::Answer_manager Class ::xowf::test_item::Answer_manager (public) Class ::xowf::test_item::Answer_manager->template::add_event_listener Class ::xowiki::formfield::candidate_box_select Class ::xowiki::formfield::candidate_box_select (public) Class ::xowiki::formfield::candidate_box_select->template::add_event_listener Class ::xowiki::formfield::range Class ::xowiki::formfield::range (public) Class ::xowiki::formfield::range->template::add_event_listener Class ::xowiki::includelet::bookmarklet-button Class ::xowiki::includelet::bookmarklet-button (public) Class ::xowiki::includelet::bookmarklet-button->template::add_event_listener

Testcases:
templates_and_scripts

template::add_footer (public)

 template::add_footer [ -direction direction ] [ -src src ] \
    [ -params params ] [ -html html ]

Add a footer include to the end of the document body. This function is used by site wide services to add functionality to the end of a page. Examples include the developer support toolbar, acs-lang translation interface and the acs-templating WYSIWYG editor textarea place holder. If you are not implementing a site wide service, you should not be using this function to add content to your page. You must supply either src or html.

Switches:
-direction
(defaults to "outer") (optional)
whether the footer should be added as the outer most page content or the inner most
-src
(optional)
the path to the include
-params
(optional)
a list of name, value pairs to pass as parameter to the include
-html
(optional)
literal html to include in the page. This parameter will be ignored if a values has been supplied for src.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 Class ::xo::lti::LTI Class ::xo::lti::LTI (public) template::add_footer template::add_footer Class ::xo::lti::LTI->template::add_footer packages/acs-bootstrap-installer/installer/www/blank-master.tcl packages/acs-bootstrap-installer/ installer/www/blank-master.tcl packages/acs-bootstrap-installer/installer/www/blank-master.tcl->template::add_footer xo::lti::LTI instproc form_render xo::lti::LTI instproc form_render (public) xo::lti::LTI instproc form_render->template::add_footer

Testcases:
No testcase defined.

template::add_header (public)

 template::add_header [ -direction direction ] [ -src src ] \
    [ -params params ] [ -html html ]

Add a header include to the beginning of the document body. This function is used by site wide services to add functionality to the beginning of a page. Examples include the developer support toolbar, acs-lang translation interface and the acs-templating WYSIWYG editor textarea place holder. If you are not implementing a site wide service, you should not be using this function to add content to your page. You must supply either src or html.

Switches:
-direction
(defaults to "outer") (optional)
whether the header should be added as the outer most page content or the inner most
-src
(optional)
the path to the include
-params
(optional)
a list of name, value pairs to pass as parameter to the include
-html
(optional)
literal html to include in the page. This parameter will be ignored if a values has been supplied for src.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-bootstrap-installer/installer/www/blank-master.tcl packages/acs-bootstrap-installer/ installer/www/blank-master.tcl template::add_header template::add_header packages/acs-bootstrap-installer/installer/www/blank-master.tcl->template::add_header

Testcases:
No testcase defined.

template::add_refresh_on_history_handler (public)

 template::add_refresh_on_history_handler

Register an event handler which will trigger a complete page refresh when we land on this page by accessing the browser's history (back and forward buttons). This is useful e.g. for those pages where some push interaction is happening and retrieving the page from the browser history would display it in an inconsistent state.

Partial Call Graph (max 5 caller/called nodes):
%3 test_templates_and_scripts templates_and_scripts (test acs-templating) template::add_refresh_on_history_handler template::add_refresh_on_history_handler test_templates_and_scripts->template::add_refresh_on_history_handler template::add_body_script template::add_body_script (public) template::add_refresh_on_history_handler->template::add_body_script xo::ChatClass instproc login xo::ChatClass instproc login (public) xo::ChatClass instproc login->template::add_refresh_on_history_handler

Testcases:
templates_and_scripts

template::add_script (public)

 template::add_script [ -async ] [ -charset charset ] \
    [ -crossorigin crossorigin ] [ -defer ] [ -integrity integrity ] \
    [ -order order ] [ -script script ] [ -section section ] \
    [ -src src ] [ -type type ]
Switches:
-async
(boolean) (optional)
whether execution of the script should be executed asynchronously as soon as it is available
-charset
(optional)
the charset attribute of the script tag, i.e. the character set of the script if it differs from the main document
-crossorigin
(optional)
Enumerated attribute to indicate whether CORS (Cross-Origin Resource Sharing) should be used
-defer
(boolean) (optional)
whether execution of the script should be deferred until after the page has been loaded
-integrity
(optional)
provide hash values for W3C Subresource Integrity recommendation
-order
(defaults to "0") (optional)
specify inclusion order
-script
(optional)
the inline script for the body of the script tag. This parameter will be ignored if a value has been supplied for src
-section
(defaults to "head") (optional)
section, where script is added ("head" or "body")
-src
(optional)
the src attribute of the script tag, i.e. the source url of the script
-type
(defaults to "text/javascript") (optional)
the type attribute of the script tag, e.g. 'text/javascript'

Partial Call Graph (max 5 caller/called nodes):
%3 Class ::xowiki::formfield::FormField Class ::xowiki::formfield::FormField (public) template::add_script template::add_script Class ::xowiki::formfield::FormField->template::add_script Class ::xowiki::formfield::numeric Class ::xowiki::formfield::numeric (public) Class ::xowiki::formfield::numeric->template::add_script packages/acs-bootstrap-installer/installer/www/blank-master.tcl packages/acs-bootstrap-installer/ installer/www/blank-master.tcl packages/acs-bootstrap-installer/installer/www/blank-master.tcl->template::add_script richtext::ckeditor4::initialize_widget richtext::ckeditor4::initialize_widget (public) richtext::ckeditor4::initialize_widget->template::add_script richtext::ckeditor5::initialize_widget richtext::ckeditor5::initialize_widget (public) richtext::ckeditor5::initialize_widget->template::add_script template::add_body_script template::add_body_script (public) template::add_script->template::add_body_script template::head::add_script template::head::add_script (public) template::add_script->template::head::add_script

Testcases:
No testcase defined.

template::collect_body_scripts (public)

 template::collect_body_scripts

Collect the body scripts via an easy to call function, hiding the template used for the implementation.

Partial Call Graph (max 5 caller/called nodes):
%3 test_templates_and_scripts templates_and_scripts (test acs-templating) template::collect_body_scripts template::collect_body_scripts test_templates_and_scripts->template::collect_body_scripts template::adp_include template::adp_include (public) template::collect_body_scripts->template::adp_include Class ::xowf::test_item::Answer_manager Class ::xowf::test_item::Answer_manager (public) Class ::xowf::test_item::Answer_manager->template::collect_body_scripts xowf::test_item::Answer_manager instproc render_print_button xowf::test_item::Answer_manager instproc render_print_button (protected) xowf::test_item::Answer_manager instproc render_print_button->template::collect_body_scripts

Testcases:
templates_and_scripts

template::get_body_event_handlers (public)

 template::get_body_event_handlers

Get body event handlers specified with template::add_body_handler. The proc clears the global variable ::template::body_handlers after having processed its content.

Partial Call Graph (max 5 caller/called nodes):
%3 test_templates_and_scripts templates_and_scripts (test acs-templating) template::get_body_event_handlers template::get_body_event_handlers test_templates_and_scripts->template::get_body_event_handlers template::add_body_script template::add_body_script (public) template::get_body_event_handlers->template::add_body_script template::register_double_click_handler template::register_double_click_handler (private) template::get_body_event_handlers->template::register_double_click_handler packages/acs-bootstrap-installer/installer/www/blank-master.tcl packages/acs-bootstrap-installer/ installer/www/blank-master.tcl packages/acs-bootstrap-installer/installer/www/blank-master.tcl->template::get_body_event_handlers packages/acs-templating/lib/body_scripts.tcl packages/acs-templating/ lib/body_scripts.tcl packages/acs-templating/lib/body_scripts.tcl->template::get_body_event_handlers

Testcases:
templates_and_scripts

template::get_footer_html (public)

 template::get_footer_html

Get footers as a chunk of html suitable for insertion into blank-master.adp Called only from blank-master.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-bootstrap-installer/installer/www/blank-master.tcl packages/acs-bootstrap-installer/ installer/www/blank-master.tcl template::get_footer_html template::get_footer_html packages/acs-bootstrap-installer/installer/www/blank-master.tcl->template::get_footer_html template::adp_include template::adp_include (public) template::get_footer_html->template::adp_include template::themed_template template::themed_template (public) template::get_footer_html->template::themed_template

Testcases:
No testcase defined.

template::get_header_html (public)

 template::get_header_html

Get headers as a chunk of html suitable for insertion into blank-master.adp Called only from blank-master.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-bootstrap-installer/installer/www/blank-master.tcl packages/acs-bootstrap-installer/ installer/www/blank-master.tcl template::get_header_html template::get_header_html packages/acs-bootstrap-installer/installer/www/blank-master.tcl->template::get_header_html template::adp_include template::adp_include (public) template::get_header_html->template::adp_include

Testcases:
No testcase defined.

template::head::add_css (public)

 template::head::add_css [ -alternate ] [ -crossorigin crossorigin ] \
    -href href [ -integrity integrity ] [ -lang lang ] \
    [ -media media ] [ -order order ] [ -title title ]

Add a link tag with relation type 'stylesheet' or 'alternate stylesheet', and type 'text/css' to the head section of the document to be returned to the users client. A given target stylesheet may only be added once; subsequent calls to add_css will replace the existing entry. This function is a wrapper around template::head::add_link.

Switches:
-alternate
(boolean) (optional)
sets the rel attribute of the link tag defining to 'alternate stylesheet' if set, sets it to 'stylesheet' otherwise
-crossorigin
(optional)
Enumerated attribute to indicate whether CORS (Cross-Origin Resource Sharing) should be used
-href
(required)
the href attribute of the link tag, e.g. the target stylesheet
-integrity
(optional)
provide hash values for W3C Subresource Integrity recommendation
-lang
(optional)
the lang attribute of the link tag specifying the language of its attributes if they differ from the document language
-media
(defaults to "all") (optional)
the media attribute of the link tag describing which display media this link is relevant to. This may be a comma separated list of values, e.g. 'screen,print,braille'
-order
(defaults to "0") (optional)
-title
(optional)
the title attribute of the link tag describing the target of this link
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_xowiki_test_cases xowiki_test_cases (test xowiki) template::head::add_css template::head::add_css test_xowiki_test_cases->template::head::add_css template::head::add_link template::head::add_link (public) template::head::add_css->template::head::add_link Class ::xowiki::formfield::FormField Class ::xowiki::formfield::FormField (public) Class ::xowiki::formfield::FormField->template::head::add_css ad_html_text_convert ad_html_text_convert (public) ad_html_text_convert->template::head::add_css cookieconsent::add_to_page cookieconsent::add_to_page (public) cookieconsent::add_to_page->template::head::add_css packages/acs-admin/www/users/merge.tcl packages/acs-admin/ www/users/merge.tcl packages/acs-admin/www/users/merge.tcl->template::head::add_css packages/acs-automated-testing/www/admin/index.tcl packages/acs-automated-testing/ www/admin/index.tcl packages/acs-automated-testing/www/admin/index.tcl->template::head::add_css

Testcases:
xowiki_test_cases

template::head::add_javascript (public)

 template::head::add_javascript [ -async ] [ -charset charset ] \
    [ -crossorigin crossorigin ] [ -defer ] [ -integrity integrity ] \
    [ -order order ] [ -script script ] [ -src src ]

Add a script of type 'text/javascript' to the head section of the document to be returned to the users client. This function is a wrapper around template::head::add_script. You must supply either src or script.

Switches:
-async
(boolean) (optional)
whether execution of the script should be executed asynchronously as soon as it is available
-charset
(optional)
the charset attribute of the script tag, i.e. the character set of the script if it differs from the main document
-crossorigin
(optional)
Enumerated attribute to indicate whether CORS (Cross-Origin Resource Sharing) should be used
-defer
(boolean) (optional)
whether execution of the script should be deferred until after the page has been loaded
-integrity
(optional)
provide hash values for W3C Subresource Integrity recommendation
-order
(defaults to "0") (optional)
specify inclusion order
-script
(optional)
the inline script for the body of the script tag. This parameter will be ignored if a value has been supplied for src
-src
(optional)
the src attribute of the script tag, i.e. the source url of the script
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_html_text_convert ad_html_text_convert (public) template::head::add_javascript template::head::add_javascript ad_html_text_convert->template::head::add_javascript boomerang::initialize_widget boomerang::initialize_widget (public) boomerang::initialize_widget->template::head::add_javascript cookieconsent::add_to_page cookieconsent::add_to_page (public) cookieconsent::add_to_page->template::head::add_javascript packages/acs-templating/www/scripts/xinha/attach-file.tcl packages/acs-templating/ www/scripts/xinha/attach-file.tcl packages/acs-templating/www/scripts/xinha/attach-file.tcl->template::head::add_javascript packages/acs-templating/www/scripts/xinha/attach-image.tcl packages/acs-templating/ www/scripts/xinha/attach-image.tcl packages/acs-templating/www/scripts/xinha/attach-image.tcl->template::head::add_javascript template::head::add_script template::head::add_script (public) template::head::add_javascript->template::head::add_script

Testcases:
No testcase defined.

template::head::add_link (public)

 template::head::add_link [ -crossorigin crossorigin ] -href href \
    [ -integrity integrity ] [ -lang lang ] [ -media media ] \
    [ -order order ] -rel rel [ -title title ] [ -type type ]

Add a link tag to the head section of the document to be returned to the users client. A given target document may only be added once for a specified relation; subsequent calls to add_link will replace the existing entry.

Switches:
-crossorigin
(optional)
Enumerated attribute to indicate whether CORS (Cross-Origin Resource Sharing) should be used
-href
(required)
the href attribute of the link tag, e.g. the target document of the link
-integrity
(optional)
provide hash values for W3C Subresource Integrity recommendation
-lang
(optional)
the lang attribute of the link tag specifying the language of its attributes if they differ from the document language
-media
(optional)
the media attribute of the link tag describing which display media this link is relevant to. This may be a comma
-order
(defaults to "0") (optional)
specify inclusion order
-rel
(required)
the rel attribute of the link tag defining the relationship of the linked document to the current one, e.g. 'stylesheet'
-title
(optional)
the title attribute of the link tag describing the target of this link
-type
(optional)
the type attribute of the link tag, e.g. 'text/css' separated list of values, e.g. 'screen,print,braille'
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 Class ::xowf::test_item::Question_manager Class ::xowf::test_item::Question_manager (public) template::head::add_link template::head::add_link Class ::xowf::test_item::Question_manager->template::head::add_link template::head::add_css template::head::add_css (public) template::head::add_css->template::head::add_link xowf::test_item::Question_manager instproc question_statistics_block xowf::test_item::Question_manager instproc question_statistics_block (public) xowf::test_item::Question_manager instproc question_statistics_block->template::head::add_link

Testcases:
No testcase defined.

template::head::add_meta (public)

 template::head::add_meta [ -http_equiv http_equiv ] [ -name name ] \
    [ -scheme scheme ] [ -content content ] [ -lang lang ]

Add a meta tag to the head section of the document to be returned to the users client. A meta tag with a given name or http-equiv may only be added once; subsequent calls to add_meta will replace the existing entry. You must supply either name or http_equiv.

Switches:
-http_equiv
(optional)
the http-equiv attribute of the meta tag, i.e. the HTTP header which this metadata is equivalent to e.g. 'content-type'
-name
(optional)
the name attribute of the meta tag, i.e. the metadata identifier
-scheme
(optional)
the scheme attribute of the meta tag defining which metadata scheme should be used to interpret the metadata, e.g. 'DC' for Dublin Core (http://dublincore.org/)
-content
(optional)
the content attribute of the meta tag, i.e. the metadata value
-lang
(optional)
the lang attribute of the meta tag specifying the language of its attributes if they differ from the document language

Partial Call Graph (max 5 caller/called nodes):
%3 test_xowiki_test_cases xowiki_test_cases (test xowiki) template::head::add_meta template::head::add_meta test_xowiki_test_cases->template::head::add_meta packages/acs-bootstrap-installer/installer/www/blank-master.tcl packages/acs-bootstrap-installer/ installer/www/blank-master.tcl packages/acs-bootstrap-installer/installer/www/blank-master.tcl->template::head::add_meta packages/acs-subsite/www/admin/plain-master.tcl packages/acs-subsite/ www/admin/plain-master.tcl packages/acs-subsite/www/admin/plain-master.tcl->template::head::add_meta packages/acs-subsite/www/plain-master.tcl packages/acs-subsite/ www/plain-master.tcl packages/acs-subsite/www/plain-master.tcl->template::head::add_meta packages/acs-subsite/www/register/index.tcl packages/acs-subsite/ www/register/index.tcl packages/acs-subsite/www/register/index.tcl->template::head::add_meta packages/acs-subsite/www/shared/plain-master.tcl packages/acs-subsite/ www/shared/plain-master.tcl packages/acs-subsite/www/shared/plain-master.tcl->template::head::add_meta

Testcases:
xowiki_test_cases

template::head::add_script (public)

 template::head::add_script [ -async ] [ -charset charset ] \
    [ -crossorigin crossorigin ] [ -defer ] [ -integrity integrity ] \
    [ -order order ] [ -script script ] [ -src src ] [ -type type ]

Add a script to the head section of the document to be returned to the users client. A script library in an external file may only be included once; subsequent calls to add_script will replace the existing entry. Anonymous script blocks will be added without checking for duplicates; the caller must ensure that anonymous script blocks are not inadvertently added multiple times. You must supply either src or script.

Switches:
-async
(boolean) (optional)
whether execution of the script should be executed asynchronously as soon as it is available
-charset
(optional)
the charset attribute of the script tag, i.e. the character set of the script if it differs from the main document
-crossorigin
(optional)
Enumerated attribute to indicate whether CORS (Cross-Origin Resource Sharing) should be used
-defer
(boolean) (optional)
whether execution of the script should be deferred until after the page has been loaded
-integrity
(optional)
provide hash values for W3C Subresource Integrity recommendation
-order
(defaults to "0") (optional)
specify inclusion order
-script
(optional)
the inline script for the body of the script tag. This parameter will be ignored if a value has been supplied for src
-src
(optional)
the src attribute of the script tag, i.e. the source url of the script
-type
(defaults to "text/javascript") (optional)
the type attribute of the script tag, e.g. 'text/javascript'

Partial Call Graph (max 5 caller/called nodes):
%3 packages/forums/www/message-view.tcl packages/forums/ www/message-view.tcl template::head::add_script template::head::add_script packages/forums/www/message-view.tcl->template::head::add_script packages/forums/www/moderate/message-delete.tcl packages/forums/ www/moderate/message-delete.tcl packages/forums/www/moderate/message-delete.tcl->template::head::add_script template::add_script template::add_script (public) template::add_script->template::head::add_script template::head::add_javascript template::head::add_javascript (public) template::head::add_javascript->template::head::add_script xo::Page proc header_stuff xo::Page proc header_stuff xo::Page proc header_stuff->template::head::add_script security::csp::require security::csp::require (public) template::head::add_script->security::csp::require template::head::require_csp template::head::require_csp (private) template::head::add_script->template::head::require_csp

Testcases:
No testcase defined.

template::head::add_style (public)

 template::head::add_style -style style [ -title title ] [ -lang lang ] \
    [ -media media ] [ -type type ]

Add an embedded css style declaration

Switches:
-style
(required)
CSS content to be included in the style tag
-title
(optional)
the title attribute of the link tag describing the target of this link
-lang
(optional)
the lang attribute of the link tag specifying the language of its attributes if they differ from the document language
-media
(optional)
the media attribute of the link tag describing which display media this link is relevant to. This may be a comma separated list of values, e.g. 'screen,print,braille'
-type
(defaults to "text/css") (optional)
the type attribute of the link tag, e.g. 'text/css'
Author:
Dave Bauer <dave@thedesignexperience.org>
Created:
2007-11-30

Partial Call Graph (max 5 caller/called nodes):
%3 ad_html_text_convert ad_html_text_convert (public) template::head::add_style template::head::add_style ad_html_text_convert->template::head::add_style apidoc::tclcode_to_html apidoc::tclcode_to_html (public) apidoc::tclcode_to_html->template::head::add_style packages/acs-api-browser/www/proc-view.tcl packages/acs-api-browser/ www/proc-view.tcl packages/acs-api-browser/www/proc-view.tcl->template::head::add_style packages/acs-developer-support/www/shell.tcl packages/acs-developer-support/ www/shell.tcl packages/acs-developer-support/www/shell.tcl->template::head::add_style packages/acs-templating/www/scripts/xinha/attach-file.tcl packages/acs-templating/ www/scripts/xinha/attach-file.tcl packages/acs-templating/www/scripts/xinha/attach-file.tcl->template::head::add_style _ _ (public) template::head::add_style->_

Testcases:
No testcase defined.

template::head::can_resolve_urn (public)

 template::head::can_resolve_urn resource

Return a boolean value indicating, whether we can resolve the URN.

Parameters:
resource

Partial Call Graph (max 5 caller/called nodes):
%3 test_urn_api urn_api (test acs-templating) template::head::can_resolve_urn template::head::can_resolve_urn test_urn_api->template::head::can_resolve_urn Class ::xowf::test_item::Answer_manager Class ::xowf::test_item::Answer_manager (public) Class ::xowf::test_item::Answer_manager->template::head::can_resolve_urn 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::head::can_resolve_urn packages/xotcl-request-monitor/www/index.tcl packages/xotcl-request-monitor/ www/index.tcl packages/xotcl-request-monitor/www/index.tcl->template::head::can_resolve_urn packages/xotcl-request-monitor/www/long-calls.tcl packages/xotcl-request-monitor/ www/long-calls.tcl packages/xotcl-request-monitor/www/long-calls.tcl->template::head::can_resolve_urn xowf::test_item::Answer_manager instproc grading_table xowf::test_item::Answer_manager instproc grading_table (public) xowf::test_item::Answer_manager instproc grading_table->template::head::can_resolve_urn

Testcases:
urn_api

template::head::flush_link (public)

 template::head::flush_link -href href -rel rel

Flush a link tag, which was previously set in the head section via template::head::add_link

Switches:
-href
(required)
the href attribute of the link tag, e.g. the target document of the link. A glob pattern similar link in "string match" can be provided.
-rel
(required)
the rel attribute of the link tag defining the relationship of the linked document to the current one, e.g. 'stylesheet'
Author:
Gustaf Neumann
Created:
2018-03-09
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_head_includes head_includes (test acs-templating) template::head::flush_link template::head::flush_link test_head_includes->template::head::flush_link template::head::flush_included template::head::flush_included (private) template::head::flush_link->template::head::flush_included template::head::prepare_multirows template::head::prepare_multirows (private) template::head::prepare_multirows->template::head::flush_link

Testcases:
head_includes

template::head::flush_script (public)

 template::head::flush_script -src src

Flush a script tag, which was previously set in the head section via template::add_script. One can delete multiple entries by providing a glob pattern.

Switches:
-src
(required)
src attribute of the script tag, i.e. the source url of the script. A glob pattern similar link in "string match" can be provided.
Author:
Gustaf Neumann
Created:
2018-03-09
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_head_includes head_includes (test acs-templating) template::head::flush_script template::head::flush_script test_head_includes->template::head::flush_script template::head::flush_included template::head::flush_included (private) template::head::flush_script->template::head::flush_included

Testcases:
head_includes

template::head::includes (public)

 template::head::includes -container container -parts parts

Define, that a compound resource (container) contains multiple parts. Container and parts are typically URLs, which are referred to by a "href" attribute or by link or a "src" attribute of a script.

Switches:
-container
(required)
compound resource
-parts
(required)
list of resources, which are included in a compound resource (container).
Author:
Gustaf Neumann
Created:
2018-03-09
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_head_includes head_includes (test acs-templating) template::head::includes template::head::includes test_head_includes->template::head::includes packages/openacs-bootstrap3-theme/tcl/resource-init.tcl packages/openacs-bootstrap3-theme/ tcl/resource-init.tcl packages/openacs-bootstrap3-theme/tcl/resource-init.tcl->template::head::includes

Testcases:
head_includes

template::register_urn (public)

 template::register_urn -urn urn -resource resource \
    [ -csp_list csp_list ]

Register a URN for a resource. These URNs provide a single place for e.g. updating references to external resources when switching between a CDN and a local resource, or when a resource should be updated. We could consider a dns-prefetch for CDN requests. When the url-check is performed at register time, the performance for processing the url can be neglected.

Switches:
-urn
(required)
-resource
(required)
-csp_list
(optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_urn_api urn_api (test acs-templating) template::register_urn template::register_urn test_urn_api->template::register_urn highcharts::register_urns highcharts::register_urns (private) highcharts::register_urns->template::register_urn packages/bootstrap-icons/tcl/resource-init.tcl packages/bootstrap-icons/ tcl/resource-init.tcl packages/bootstrap-icons/tcl/resource-init.tcl->template::register_urn packages/fa-icons/tcl/resource-init.tcl packages/fa-icons/ tcl/resource-init.tcl packages/fa-icons/tcl/resource-init.tcl->template::register_urn packages/openacs-bootstrap3-theme/tcl/resource-init.tcl packages/openacs-bootstrap3-theme/ tcl/resource-init.tcl packages/openacs-bootstrap3-theme/tcl/resource-init.tcl->template::register_urn packages/openacs-bootstrap5-theme/tcl/resource-init.tcl packages/openacs-bootstrap5-theme/ tcl/resource-init.tcl packages/openacs-bootstrap5-theme/tcl/resource-init.tcl->template::register_urn

Testcases:
urn_api

template::set_css_property (public)

 template::set_css_property [ -class class ] \
    [ -querySelector querySelector ] -property property -value value

Set the specified CSS property in the DOM tree of the browser for elements for the specified class or query selector. This function should be used sparely in special situations, where CSS modification other approaches might be too complex.

Switches:
-class
(optional)
CSS class for which properties is set
-querySelector
(optional)
CSS querySelector via the javascript function querySelectorAll
-property
(required)
CSS property
-value
(required)
value for the CSS property

Partial Call Graph (max 5 caller/called nodes):
%3 template::add_script template::add_script (public) template::set_css_property template::set_css_property template::set_css_property->template::add_script

Testcases:
No testcase defined.
[ show source ]