You are viewing documentation for v1.1.x. Change

styleSheetLinkTag()

Description

Returns a link tag for a stylesheet (or several) based on the supplied arguments.

Function Syntax

styleSheetLinkTag([ sources, type, media, head ])

Parameters

Parameter Type Required Default Description
sources string No The name of one or many CSS files in the stylesheets folder, minus the .css extension. (Can also be called with the source argument.)
type string No text/css The type attribute for the link tag.
media string No all The media attribute for the link tag.
head string No false Set to true to place the output in the head area of the HTML page instead of the default behavior, which is to place the output where the function is called from.

Examples

<!--- view code --->
<head>
    <!--- Includes `stylesheets/styles.css` --->
#styleSheetLinkTag("styles")#
    <!--- Includes `stylesheets/blog.css` and `stylesheets/comments.css` --->
    #styleSheetLinkTag("blog,comments")#
    <!--- Includes printer style sheet --->
    #styleSheetLinkTag(source="print", media="print")#
</head>

<body>
    <!--- This will still appear in the `head` --->
    #styleSheetLinkTag(source="tabs", head=true)#
</body>