Bug #22983
closedSprites - user defined page types are not respected anymore
0%
Description
For marking pages i use often user defined icons.
Here is an example ho to do in extTables.php:
$TCA['pages']['columns']['module']['config']['items'][] = array('Pagetype 1', 'pagetype1', '../fileadmin/pageicons/asterisk_orange.png'); $TCA['pages']['columns']['module']['config']['items'][] = array('Pagetype 2', 'pagetype2', '../fileadmin/pageicons/award_star_bronze_1.png'); $TCA['pages']['columns']['module']['config']['items'][] = array('Pagetype 3', 'pagetype3', '../fileadmin/pageicons/award_star_silver_3.png'); $TCA['pages']['columns']['module']['config']['items'][] = array('Pagetype 4', 'pagetype4', '../fileadmin/pageicons/award_star_silver_2.png'); $TCA['pages']['columns']['module']['config']['items'][] = array('Pagetype 5', 'pagetype5', '../fileadmin/pageicons/award_star_gold_1.png'); $ICON_TYPES['pagetype1']['icon'] = '../fileadmin/pageicons/asterisk_orange.png'; $ICON_TYPES['pagetype2']['icon'] = '../fileadmin/pageicons/award_star_bronze_1.png'; $ICON_TYPES['pagetype3']['icon'] = '../fileadmin/pageicons/award_star_silver_3.png'; $ICON_TYPES['pagetype4']['icon'] = '../fileadmin/pageicons/award_star_silver_2.png'; $ICON_TYPES['pagetype5']['icon'] = '../fileadmin/pageicons/award_star_gold_1.png';
This does not work anymore. If i select one type in "Contains plugin" it's not used in page tree or elsewhere.
(issue imported from #M14849)
Files
Updated by Steffen Ritter over 14 years ago
there cannot be an automatic fallback
you have to register your icon to the srpitemanager:
/**
* static function to add a type-with icon to an already existent table which makes use of "typeicon_classes"
* feature or to provide icon for "modules" in pages table
* @param string $table the table the type has been added
* @param string $type the type - must equal the value of the column in the table
* @param string $iconFile relative to PATH_typo3
*/
public static function addTcaTypeIcon($table, $type, $iconFile) {
Updated by Claus Harup over 14 years ago
Brillant - In which file can I find the function and maybe an example?
There is nothing in 4.4 beta on TYPO3 unleashed?!
Updated by Steffen Kamper over 14 years ago
this has to be done in core - TCA definitions has to be automatic resolved.
Updated by Steffen Ritter over 14 years ago
@Claus Harup:
just Put:
t3lib_spritemanager::addTcaTypeIcon('tx_myext_table1','contains_MYstatus','../typo3conf/ext/my/ext/mygraphic.gif');
@ Steffen K:
no, there has been an explizit decision to do not.
Icons of records are considered as a skin issue,
there won't be a messing up of skin with such special things only present in one core table.
there is an break in backwards compatibility - right, but since we are had major version this belongs to cleanup which is normal.
Updated by Claus Harup over 14 years ago
Hi Steffen
Using t3lib_spritemanager::addTcaTypeIcon('pages', 'modules_denmark, t3lib_extMgm::extRelPath($_EXTKEY).'flags/flag_denmark.png);
Gives me:
[TBE_STYLES][spritemanager][singleIcons][tcarecords-pages-modules_denmark]=../typo3conf/ext/tcsys/flags/flag_denmark.png
.... but it still does not work?!?
Updated by Steffen Ritter over 14 years ago
after discussion with steffen we will provide an fallback triggering en depreciation entry
Updated by Steffen Ritter over 14 years ago
@Harup
type has to bee contains- instead of modules-
but we discovered a bug in this function anyways which is fixed in 4.4 and trunk
Updated by Claus Harup over 14 years ago
I simply can not get it to work!
Here is my code:
t3lib_spritemanager::addTcaTypeIcon('pages', 'contains-module_denmark, t3lib_extMgm::extRelPath($_EXTKEY).'flags/flag_denmark.png);
What am I doing wrong?
Updated by Thomas Deinhamer over 14 years ago
I also tried this now, but I wasn't able to figure out how to do it right. Any hints? Thanks a lot!