Extension Development, add static extension templates
From TYPO3Wiki
[edit]
Static extension templates
You can add external typoscript templates to your extension if needed. An external typoscript template could define for example a default css for your extension.
For example:
1) setup.txt:
<TS> :plugin.tx_myext_pi1._CSS_DEFAULT_STYLE ( body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-image: url(typo3conf/ext/myext/res/fullwall.jpg); background-repeat: repeat-x } )
setup.txt is the static template filename and can be found in the folder pi1/static/css of your extension.
2) ext_tables.php:
<PHP> :t3lib_extMgm::addStaticFile($_EXTKEY,"pi1/static/css","myext default css");
in ext_tables.php of your extension call t3lib_extMgm::addStaticFile($extKey,$path,$title) with the right parameters. more
3) "include static template (from extensions)" selector:
With the "include static template (from extensions)" selector in the template record you can add the static template to your typoscript template.
--Chibox 15:13, 12 February 2008 (CET)
