[TYPO3-dev] SysFolder, Contains Plugin, $ICON_TYPES

Uschi Renziehausen typo3news at otherone.de
Thu Jan 1 14:12:11 CET 2009


Hi Steffen :-)

Steffen Kamper wrote:
> Hi Uschi,
> 
> Uschi Renziehausen schrieb:
>> Happy New Year to all,
>>
> 
> from me too!
> 
>> I would like to modify the items in the list that shows up under 
>> Contains Plugin which in itself should not be a problem. Of course I 
>> would like to have special icons for my SysFolders if they e.g. 
>> contain the plugin Acronym. Reading the Core Api [1] I found out that 
>> this is done with the global array $ICON_TYPES. Unfortunately the 
>> documentation also says that the usage of that array is deprecated. So 
>> here my questions:
>>
> where does it says that? I don't see any clue for it.
>

Sorry, I forgot the link to the Core Api change: http://typo3.org/documentation/document-library/core-documentation/doc_core_api/4.2.0/view/4/3/#id4458768

The last paragraph under $ICON_TYPES reads: "Usage of $ICON_TYPES is deprecated."

>> 1) Is there an alternative way to get a special icon for SysFolder 
>> with field module set to x? If so, can you point me into the right 
>> direction?
> 
> yes, sure. This is the field "module" in page record, and if an icon is 
> defined for the entry it will be displayed.
> 
> You can add your own icon there by defining this in your extTabls.php:
> 
> $TCA['pages']['columns']['module']['config']['items'][] = 
> array('MySpecialIcon', 'specialI');
> $ICON_TYPES['specialI']{'icon'} = 'gfx/i/domain.gif';
> 

Ah ok, then this is the alternative method I was asking for. I would have simly modified the global icon $ICON_TYPES. Perhaps the documentation should be changed here?

> for any reason the module name (specialI) is limited to 10 Chars.
> 

A bit grudgy, that limitation, but ok

>> 3) Can I ensure somehow that for a SysFolder with the e.g. value news 
>> only News Items will be allowed?
>>
> 
> there is no check for this. You can do something simular with pageTS like
> mod.web_list.allowedNewTables = pages, tt_news
>

Hmmm, that would mean I would have to add that restriction to every folder with that module manually which I would like to avoid. In that case, I suppose, I will have to create a new doktype instead, 
because there I have the option to set a list of allowedTables under $PAGE_TYPES[myPageType][allowedTables]? I just found out about that feature, and yeah, that finally has an influence on that 
absolutely crowded new record view that you get when you choose new in the context menu of the pagetree. That thing is REALLY an URGENTLY subject to change from a usability point of view and should be 
discussed in the hci-list.

Kind regards and thanks for help, Uschi



> (note: you only can change the "create"-icon here, technically there is 
> no restriction with createNew, eg. you can paste a record from clipboard)
> 
> vg Steffen
> 




More information about the TYPO3-dev mailing list