[TYPO3-core] RFC#14466: Bug: SpriteIconApi getSpriteIconForRecord does not find default icon
Steffen Ritter
info at rs-websystems.de
Tue May 25 07:13:11 CEST 2010
Am 25.05.2010 01:58, schrieb Jeff Segars:
Hey Jeff, thanks for your review.
Will try to explain where this is used and what will happen.
> The one thing that comes to mind here is that TSConfig can filter what
> types are available so the first type in the TCA may not be the first
> type when a record is actually created,
That's right. But as soon as the record is created row[typeColumn] will
be set --> correct icon is used.
> but from your description it
> doesn't sound like that will really matter and probably wasn't accounted
> for in the past either. Just wanted to point it out in case its a larger
> issue than what I'm seeing :)
I'm not shure how this has been handled before, if I remember correctly
the first typeicon has been used. (That's what I tried to rebuild).
In core this is used f.e. in PageModule there it states "content
elements" in header, the icon for tt_content placed before.
the old call has been getIconImage('tt_content,array());
I replaced with getSpriteIconForRecord('tt_content',attay());
I first though of a configuration need to place a "default" => 'class'
to place in typeicon_classes, but I think going the "old way" should be
enough atm.
The problem did not arise either, if the table did not use
typeicon_classes definition. When the information about the table icons
are generated from spriteGenApi, it always renders
tcrecords-###TABLE###-default which can be used as fallback.
regards
Steffen
More information about the TYPO3-team-core
mailing list