template::head::add_css (public)
template::head::add_css [ -alternate ] [ -crossorigin crossorigin ] \ -href href [ -integrity integrity ] [ -lang lang ] \ [ -media media ] [ -order order ] [ -title title ]
Defined in packages/acs-templating/tcl/head-procs.tcl
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 (optional, boolean)
- 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 (optional, defaults to
"all"
)- 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 (optional, defaults to
"0"
)- -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):
- Testcases:
- xowiki_test_cases
Source code: if {$alternate_p} { set rel "alternate stylesheet" } else { set rel "stylesheet" } template::head::add_link -rel $rel -type text/css -href $href -media $media -title $title -lang $lang -order $order -crossorigin $crossorigin -integrity $integrityXQL Not present: Generic, PostgreSQL, Oracle