Project

General

Profile

Actions

Bug #22983

closed

Sprites - user defined page types are not respected anymore

Added by Steffen Kamper over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2010-06-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

rfc14849_v3.diff (5.15 KB) rfc14849_v3.diff Administrator Admin, 2010-07-25 19:23

Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #22962: When choosing an icon in the pages module the pagetree does not respect itClosedSteffen Ritter2010-06-22

Actions
Actions #1

Updated by Claus Harup over 14 years ago

Excactly the same problem I have :-)

Actions #2

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) {

Actions #3

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?!

Actions #4

Updated by Steffen Kamper over 14 years ago

this has to be done in core - TCA definitions has to be automatic resolved.

Actions #5

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.

Actions #6

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?!?

Actions #7

Updated by Steffen Ritter over 14 years ago

after discussion with steffen we will provide an fallback triggering en depreciation entry

Actions #8

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

Actions #9

Updated by Claus Harup over 14 years ago

Okay - looking forward to 4.4.1 :-)

Actions #10

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?

Actions #11

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!

Actions

Also available in: Atom PDF