[TYPO3-templavoila] Adding JS from FCE

Steffen Kamper info at sk-typo3.de
Tue Nov 10 16:08:26 CET 2009


my solution is more complex, but i needed more complexity.
I created FCEs that use jQuery for Accordion, tabs etc. So i need 2 things:
1) add unique JS/CSS to page header
2) add individual JS to page header for each CE with an identifier

So i created a small extension doing this stuff in page template:

page.10000 < plugin.tx_fceincludes
page.10000 {
	columns = field_main,field_content,field_sidebar
	templates {
		5 {
			CSS = fileadmin/css/tabs-accordion.css
			JS = fileadmin/js/tabs-accordion.js
			unique {
				CSS =
				JS =

with templates, the 5 is the DS for the Tabs FCE. CSS and JS are 
templates using marker ###ID### replaced by id in extension, unique are 
files included once per page.

Extension analyses used CE's and if defined one is used, it includes the 

vg Steffen

More information about the TYPO3-project-templavoila mailing list