Bug #14190
closed
CSS_Styled_Content: TABLE should be more configurable
Added by Oliver Klee over 20 years ago.
Updated about 14 years ago.
Category:
Content Rendering
Description
In class.tx_cssstyledcontent_pi1.php, function render_table(), many things are hardcoded that should be configurable instead:
Class of TD and the content wrapping (currently P):
$cellAttribs = ($a>0 && ($cols-1)==$a) ? ' class="td-last"' : ' class="td-'.$a.'"';
$newCells[$a] = '
<td'.$cellAttribs.'><p>'.$this->cObj->stdWrap($cells[$a],$conf['innerStdWrap.']).'</p></td>';
Class for the TR:
$rowAttribs = ($k>0 && ($rCount-1)==$k) ? ' class="'.$oddEven.' tr-last"' : ' class="'.$oddEven.' tr-'.$k.'"';
$rows[$k]='
<tr'.$rowAttribs.'>'.implode('',$newCells).'
Class for the TABLE:
$tableTagParams['class'] = 'contenttable contenttable-'.$type;
This is with CSC 0.1.0.
(issue imported from #M131)
Files
Please submit bugs to the correct projects, in this case it would be tx_cssstyledcontent.
I'd like to configure the following items so that it is possible to get a slimmed.down version of the HTML output if desired:
- whether to have the CSS classes tr-even / tr-odd
- whether and which CSS classes to have for the TABLE
- whether to have the CSS-classes tr-last and td-last
- whether to have the CSS classes td-n and tr-n with n being the number of the call or row
These CSS classes are very useful for CSS styling, but it should be possible to change them or switch them off if they are not needed.
the uploaded patch makes everything configurable.
Greets, Sebastian
the _2 patch changes the configuration options slightly, after a suggestion of Ernesto.
Greets, Sebastian
Hi,
I would be very interested to hear your opinion on this patch, as you as well wrote the accessible_tables extension. Maybe it is possible to incoperate the changes from here into this version as well?
Greets, Sebastian
hi Sebastian,
I would be glad if the accessible_tables ext can be merged with css_styled_content.
(one extension less to maintain g)
I personally see no sense in making the names of the row classes configurable. accessible_tables offers already to change the classname for the complete table or to switch off all classes. (and the <p> tags are removed too, of course)
greets
rupert
Hi Rupi,
do you see any drawbacks in merging the extension back into css_styled_content?
Greets, Sebastian
Rupert wants to merge accessible_tables back to css_styled_content.
Greets, Sebastian
resolved in CVS by a big change in CSC (accessibility) and an update wizard.
Also available in: Atom
PDF