[TYPO3] Problem styling tables (contenttable)

Morten Kjems mortenkjems at gmail.com
Tue May 8 18:18:51 CEST 2007


Thanks a lot for your detailed explanation Joey!

After adding my own styles to the list everything works perfect.

As challenging an and difficult as Typo3 sometimes are as helpful and 
encouraging are the members of this list!

Thanks

/Morten


JoH asenau skrev:
>> I am thinking that the class "contenttable" can be configured through
>> "CSS Styled Content". The file pi1/class.tx_cssstyledcontent_pi1.php
>> holds the following code:
>>
>> -----------------------------------------
>> // Table tag params.
>> $tableTagParams = $this->getTableAttributes($conf,$type);
>> if (!$noStyles) {
>> $tableTagParams['class'] = 'contenttable
>> contenttable-'.$type.($tableClass?' '.$tableClass:'');
>> } elseif ($tableClass) {
>> $tableTagParams['class'] = $tableClass;
>> }
>> -----------------------------------------
> 
> This has nothing to do with your problem, since it is just the PHP code used
> to render the content element type "table" but not the tables of any RTE.
> 
>> But to be honest I got no clue how to edit it, or maybe I am just
>> completely of track. Am I?
> 
> Yes ;-)
> 
>> All suggestions on how to solve this problem are most welcome.
> 
> Go to the TSOB (TypoScript Objectbrowser) and foldout the section
> 
> lib.parseFunc_RTE
> 
> inside you will find some other foldouts:
> 
> externalBlocks => table => stdWrap => HTMLparser => tags => table
> 
> and this is the place you have been looking for.
> 
> In human readable language it means: Treat <table> tags as external blocks,
> that have to be parsed separately and define how the tag <table> of these
> blocks should be processed.
> 
> In this case there is something like
> 
> fixAttrib {
>     class {
>         default = contenttable
>         always = 1
>         list = contenttable
>     }
> }
> 
> This means that the class attribute of table tags has to be checked for the
> class name.
> If there is no class attribute at all (always) or just no class name
> (default), the class name should be "contenttable".
> If there is a class name it must be in the comma separated list (list), else
> the first element of the list is taken.
> 
> For you this means: It should be enough to add your class name to the comma
> separated list to prevent the parser from changing it to "contenttable".
> 
> All in one line it should be:
> lib.parseFunc_RTE.externalBlocks.table.stdWrap.HTMLparser.tags.table.fixAttr
> ib.class.list = yourname
> 
> HTH
> 
> Joey
> 


More information about the TYPO3-english mailing list