Translations
Info
All page names need to be in English.
en da  de  fr  it  ja  km  nl  ru  zh

Extension Development, add static extension templates

From TYPO3Wiki
Jump to: navigation, search

Static extension templates

You can add external TypoScript templates to your extension. An external TypoScript template could, for example, add default CSS for your extension.

For example:

1) setup.txt:

TS TypoScript:
 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 script:
 t3lib_extMgm::addStaticFile($_EXTKEY, 'pi1/static/css', 'myext default CSS');

in ext_tables.php of your extension calls t3lib_extMgm::addStaticFile($extKey, $path, $title). more

3) "include static template (from extensions)" selector:

Description

With the "include static template (from extensions)" selector in the template record you can add the static template to your typoscript template.