[TYPO3-english] How to Inclue Javascript files Based on template Layouts
Moses Dinakaran
moses.d at embitel.com
Mon Mar 29 07:21:11 CEST 2010
Hi all,
How to include Javascript based upon template layouts, My site has two and
three column layouts and I am including the following js
page{
includeJS {
file1 = fileadmin/template/js/main.js
file2 = typo3conf/ext/jquery/src/jquery.js
file3 = typo3conf/ext/jquery/plugins/jquery.validate.js
file4 = typo3conf/ext/jquery/plugins/jquery.form.js
....
}
}
Right now these js are included in both the Layouts which need to be
restricted,
Say if the page is using 2 column include only file1, if the page is using 3
column layout include all js
I am using the template selector to choose the layouts.
plugin.tx_rlmptmplselector_pi1.templateObjects.main{
10 < temp.threeColumnTemplate
20 < temp.twoColumnTemplate
}
Thanks in Advance,
Moses
More information about the TYPO3-english
mailing list