Bug #24094 » patch_rfc_16434.diff
typo3/sysext/cms/layout/class.tx_cms_layout.php (Arbeitskopie) | ||
---|---|---|
// Add new-icon link, header:
|
||
$newP = $this->newContentElementOnClick($id,$key,$lP);
|
||
$colTitle = t3lib_BEfunc::getProcessedValue('tt_content','colPos',$key);
|
||
/**
|
||
* @mficzel
|
||
* @todo get complete title from tca inclusive ts config manipulations by user func and tsConfig
|
||
*/
|
||
|
||
$tcaItems = t3lib_div::callUserFunction( 'EXT:cms/class.tx_cms_be_layout.php:tx_cms_be_layout->getColPosListItemsParsed' , $id, $this );
|
||
foreach( $tcaItems as $item) {
|
||
if ( $item[1] == $key) {
|
||
... | ... | |
// add colgroups
|
||
$colCount = intval($parser->setup['be_layout.']['colCount']);
|
||
$rowCount = intval($parser->setup['be_layout.']['rowCount']);
|
||
|
||
$grid .= '<colgroup>';
|
||
for ($i = 0; $i < $colCount; $i++) {
|
||
$grid .= '<col style="width:'.(100/$colCount).'%"></col>';
|
||
... | ... | |
$grid .= '</colgroup>';
|
||
// cycle through rows
|
||
if(count($parser->setup['be_layout.']['rows.'])) {
|
||
foreach ($parser->setup['be_layout.']['rows.'] as $rowConfig) {
|
||
$grid .= '<tr>';
|
||
for ($row = 1; $row <= $rowCount; $row++) {
|
||
$rowConfig = $parser->setup['be_layout.']['rows.'][$row.'.'];
|
||
if (!isset($rowConfig)) continue;
|
||
// and colummns
|
||
if(count($rowConfig['columns.'])) {
|
||
foreach ($rowConfig['columns.'] as $columnConfig) {
|
||
$grid .= '<tr>';
|
||
|
||
for ($col = 1; $col <= $colCount; $col++) {
|
||
$columnConfig = $rowConfig['columns.'][$col.'.'];
|
||
|
||
if (!isset($columnConfig)) continue;
|
||
// which tt_content colPos should be displayed inside this cell
|
||
$columnKey = intval($columnConfig['colPos']);
|
||
// render the grid cell
|
||
$grid .= '<td valign="top"'.
|
||
(isset($columnConfig['colspan']) ? ' colspan="'.$columnConfig['colspan'].'"' : '').
|
||
(isset($columnConfig['rowspan']) ? ' rowspan="'.$columnConfig['rowspan'].'"' : '').
|
||
' class="t3-gridCell t3-page-column t3-page-column-' . $columnKey .
|
||
(isset($columnConfig['colspan']) ? ' t3-gridCell-width'.$columnConfig['colspan'] : '') .
|
||
(isset($columnConfig['rowspan']) ? ' t3-gridCell-height'.$columnConfig['rowspan'] : '').'">';
|
||
$grid .= $head[$columnKey] . $content[$columnKey] . '</td>';
|
||
}
|
||
}
|
||
$grid .= '</tr>';
|
||
// which tt_content colPos should be displayed inside this cell
|
||
$columnKey = intval($columnConfig['colPos']);
|
||
|
||
// render the grid cell
|
||
$grid .= '<td valign="top"'.
|
||
(isset($columnConfig['colspan']) ? ' colspan="'.$columnConfig['colspan'].'"' : '').
|
||
(isset($columnConfig['rowspan']) ? ' rowspan="'.$columnConfig['rowspan'].'"' : '').
|
||
' class="t3-gridCell t3-page-column t3-page-column-' . $columnKey .
|
||
(isset($columnKey) ? ' t3-gridCell-disabled' : '') .
|
||
(isset($columnConfig['colspan']) ? ' t3-gridCell-width'.$columnConfig['colspan'] : '') .
|
||
(isset($columnConfig['rowspan']) ? ' t3-gridCell-height'.$columnConfig['rowspan'] : '').'">';
|
||
$grid .= $head[$columnKey] . $content[$columnKey] . '</td>';
|
||
|
||
}
|
||
$grid .= '</tr>';
|
||
}
|
||
$out .= $grid.'</table></div>';
|
||
}
|