TYPO3: Howto have a field for different CSS class for each content
If you want to specify a CSS class for each TYPO3 content (example: TEXT with IMAGE), you can add a new filed "Class" that will allow you to set the CSS class. Instructions:
Add the following lines to your typoscript (setup)
#[globalVar = TSFE:field|tx_modulis_ttcontent_class > 0] tt_content.stdWrap.dataWrap = <a name="{field:uid}"></a><div class="{field:tx_modulis_ttcontent_class}">|</div> #[global]You can uncomment first and last line to make sure that the CSS class will only be outputed if non empty.
Add the following Database column to the table tt_content:
It can be done with phpmyadmin or the kickstarter.
tx_modulis_ttcontent_class (type tinytext)Add the following to file typo3conf/ext_tables.php:
$tempColumns = Array ( "tx_modulis_ttcontent_class" => Array ( "exclude" => 1, "label" => "Class", "config" => Array ( "type" => "input", "size" => "30", "default" => "tt_content", ) ), ); t3lib_div::loadTCA("tt_content"); t3lib_extMgm::addTCAcolumns("tt_content",$tempColumns,1); t3lib_extMgm::addToAllTCAtypes("tt_content","tx_modulis_ttcontent_class;;;;1-1-1");Clear all caches and you're done !

August 25th, 2009 at 5:36 pm
ovafynas…
ls preteen magazines …