#59141incomplete new pages-icon enhancement
Description
when enhancing the page-icons with the following code for pages which show content from another page, the new icons are not displayed at every location in the BE.
ext_tables.php:
// Defines $icon array()
$pathToExtension = t3lib_extMgm::extRelPath('myext');
$icons = array(
'refpage' => $pathToExtension . 'Resources/Public/images/icons/refpageicon.png',
'refpage_hide' => $pathToExtension . 'Resources/Public/images/icons/refpageicon_hide.png',
);
// Gives the $icon array to the sprite manager
t3lib_SpriteManager::addSingleIcons($icons, 'myext');
// Register userfunc for page icon
$TCA['pages']['ctrl']['typeicon_classes']['userFunc'] = 'tx_myext_iconClass->getPageIcon';
Classes/class.tx_myext_iconClass.php:
<?php
class tx_myext_iconClass {
/**
* Determines icon class for pages which display content from another page
*
* @param array $parameters array with record
* @param string $ref Unused reference parameters
* @return string Class name of page
*/
public function getPageIcon($parameters, $ref) {
$iconClass = '';
$row = $parameters['row'];
if ($row['content_from_pid']) {
$iconClass = 'extensions-myext-refpage';
if ((int)$row['nav_hide'] === 1) {
$iconClass .= '_hide';
}
}
return $iconClass;
}
}
new icon:
- page tree (middle-column)
- access module IF top page
- info-module: pagetree overview
- info module: localzation overview IF top page
- access module IF subpage
- list module: pages records
- info module: localzation overview IF subpage
- info module: realURL management
- TYPO3 Element Browser
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.