Actions
Bug #17580
closedActive in template::getDynTabMenu() does not work
Start date:
2007-09-04
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
4.1
PHP Version:
4.3
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
..because "$isActive = strcmp($def['content'],'');" is never true because "$def['content']" is never empty.
Solution:
t3lib_tceforms::getMainFields() {
if ($TCA[$table]['columns'][$theField]) {
$sFieldPal='';
if ($parts[2] && !isset($this->palettesRendered[$this->renderDepth][$table][$parts[2]])) {
$sFieldPal=$this->getPaletteFields($table,$row,$parts[2]);
$this->palettesRendered[$this->renderDepth][$table][$parts[2]] = 1;
}
$sField = $this->getSingleField($table,$theField,$row,$parts[1],0,$parts[3],$parts[2]);
if ($sField) {
$sField.= $sFieldPal;
/*+*/ $out_array_meta[$out_sheet]['elementFound'] = true;
}
$out_array[$out_sheet][$out_pointer].= $sField;
} elseif ($theField=='--div--') {
...
...
// Return the imploded $out_array:
if ($out_sheet>0) { // There were --div-- dividers around...
// Create parts array for the tab menu:
$parts = array();
foreach ($out_array as $idx => $sheetContent) {
if ($out_array_meta[$idx]['title'] == 'Collegium') {
#print_r($sheetContent);
echo count($sheetContent);
echo $out_array_meta[$idx]['title']."<br /><br />";
}
$parts[] = array(
'label' => $out_array_meta[$idx]['title'],
/*modified*/ 'content' => (!$out_array_meta[$idx]['elementFound'] ? '': '<table border="0" cellspacing="0" cellpadding="0" width="100%">'.
implode('',$sheetContent).
'</table>'
);
}
...
}
The $sheetContent is never realy empty, so I could not use empty($sheetContent). The solution is additonal var which is set true if there is a "real" element.
In the template::getDynTabMenu() instead of the A-tag there should be span with some styles ;)
(issue imported from #M6259)
Files
Updated by Malte Jansen about 17 years ago
I have added a new version.
I have found a better way to check if the tab should be wrapped and than activated.
Actions