How to include multiple CSS and JS files using Typoscript
You may include multiple CSS files using the following code:
page.includeCSS {
file1 = fileadmin/templates/project1/css/file1.css
file2 = fileadmin/templates/project1/css/file2.css
file3 = fileadmin/templates/project1/css/file3.css}
Use this code to include Javascript files:
page.includeJS {
file1 = fileadmin/templates/project1/js/file1.js
file2 = fileadmin/templates/project1/js/file2.js
file3 = fileadmin/templates/project1/js/file3.js}
Consider you wish to have a CSS specifically for IE 6 and below:
[version= < 7][browser = msie]
page.includeCSS.file4 = fileadmin/templates/prj1/css/ie6fix.css
[global]
Posted in Typo3

2 Comments










March 17th, 2009 at 9:12 pm
useless help to you really as any reader will see this but still:
file2 = fileadmin/templates/project1/js/file1.js
should ofcourse be file1 =
as you would otherwise overwrite this property.
March 18th, 2009 at 7:06 pm
Hey Phlunk,
Thanks for pointing out the error. I have corrected it.