For more information... RTFM!

You are not logged in

Powered by Interchange version 5.7.0


Builds a CSS file and outputs a link to the file.


  • [css name]

Parameter Description Default
name The name of the Variable that contains the CSS text, and the name of the CSS file to be created or updated. None
basefile A file used to compare the modification time against the name file. None
imagedir Directory path prefix to use. ImageDir
no_imagedir imagedir to the generated link URL. No
literal Literal CSS text to use instead of the name Variable. None
media The media attribute for the HTML <link> tag. None
mode File creation mode. 0644
output_dir Directory in which to create the CSS file. images
relative Set to a true value to copy the directory hierarchy in the output_dir directory. No
timed Regenerate the file on a timed basis. None


Tag usage example

[css name=THEME_CSS basefile=variables/THEME_CSS]


This tag builds a CSS file from a Variable, or another source specified using the literal parameter, and generates HTML tag to serve the file to the website's visitors.

If the target CSS file cannot be written, for whatever reason, then the CSS will be output to the page, inside a <style type="text/css"> block, instead.



The name of the CSS file that will be created by Interchange, updated as required and served website visitors.  The filename will be forced to lowercase and a .css suffix will be appended.

This is also the name of the Variable that will be expected to contain the CSS text, unless the literal parameter is specified.


This file's modification time will be checked against the output CSS file.  The output file will be rebuilt if it is older than this file.  This is intended for use where the Variable, specified using the name parameter, has been set up using the DirConfig parameter.


Specify the CSS file's location.

If the no_imagedir parameter is not specified then this parameter's value will be prepended to the CSS filename served to the website's visitors.


When set true the imagedir prefix will not be prepended to the start of the CSS file</tt>.


You can use this parameter to specify the CSS text instead of using the "name" Variable.  For example:

[set my_css]
.title { background-color: #336699; }

[css name="test_css1" literal="[scratch my_css]"]
[css name="test_css2" literal="body { background-color: yellow; }"]


The CSS file won't be rebuilt when you change the literal value.  To cause a rebuild, you must delete the generated CSS file.


Set the CSS media type, such as PRINT, SCREEN, AURAL and HANDHELD etc.


Permissions to use when creating the CSS file.


Directory in which to create the CSS file, with the permissions set using the mode parameter.


If this parameter is set true then this tag will copy the directory hierarchy in the output_dir directory.

For instance, if you set this to "foo/bar/index.html" then this tag would would output the CSS file to "images/foo/bar/mycss.css".  That is assuming that the imagedir parameter, and/or the ImageDir configuration directive is set to "images".


Used for regenerating the CSS file on a timed basis.  You can specify a number of minutes here, or can use any time interval, such as "1 hour".

Category:  Interchange tags
Last modified by: Kevin Walsh
Modification date: Sunday 5 August 2007 at 2:38 AM (EDT)
Home  |  Legal nonsense  |  Privacy policy  |  Donations  |  Contact us