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]
I include jQuery in my base template and I want to include a jQuery plugin from ext_typoscript_setup.txt in my extension.
In this case, the plugin is included before the main library.
Can this order be changed?
Thanks
Yes this is possible.
If you using includeCSS then the file name is usually used to sort the order!
At present this sorting seems tricky when using includeCSS, however you may try to use the headerData method to get better control.
Can anyone help me in including a php file. in this file i have a script which is to be run.. so taht whenver a page is loaded from typoscript i want dis php script to run automatically.
This is fairly easy. I wrote a small article that can be located here:
http://blog.chandanweb.com/typo3/how-to-include-a-custom-php-script-in-typo3
Hope that helps you.
Hey Phlunk,
Thanks for pointing out the error. I have corrected it.
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.