Bug #14190
closedCSS_Styled_Content: TABLE should be more configurable
0%
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
Updated by Robert Lemke over 20 years ago
Please submit bugs to the correct projects, in this case it would be tx_cssstyledcontent.
Updated by Sebastian Kurfuerst about 19 years ago
what exactly do you want to configure?
if you want to have more advanced tables, maybe you want to use
http://typo3.org/extensions/repository/search/kb_conttable/
Greets, Sebastian
Updated by Oliver Klee about 19 years ago
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.
Updated by Sebastian Kurfuerst about 19 years ago
the uploaded patch makes everything configurable.
Greets, Sebastian
Updated by Sebastian Kurfuerst about 19 years ago
the _2 patch changes the configuration options slightly, after a suggestion of Ernesto.
Greets, Sebastian
Updated by Sebastian Kurfuerst about 19 years ago
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
Updated by Rupert Germann about 19 years ago
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
Updated by Sebastian Kurfuerst about 19 years ago
Hi Rupi,
do you see any drawbacks in merging the extension back into css_styled_content?
Greets, Sebastian
Updated by Sebastian Kurfuerst about 19 years ago
Rupert wants to merge accessible_tables back to css_styled_content.
Greets, Sebastian
Updated by Sebastian Kurfuerst almost 19 years ago
resolved in CVS by a big change in CSC (accessibility) and an update wizard.