[TYPO3-dev] Extensions with new CType

Steffen Kamper steffen at sk-typo3.de
Wed Apr 16 20:28:52 CEST 2008


Hi,

as you know, in 4.2 the CTypes are listed with icons in selectbox.
What really doesn't looks nice is when other extensions adding a CType, they 
are rendered without icon.
I think most devs doesn't know that there is the possibility to deliver an 
icon for the selectbox.

Here is example of the typical code to add the plugin's CType:
t3lib_extMgm::addPlugin(array(
  "LLL:EXT:page_php_content/locallang_db.php:tt_content.CType",
  $_EXTKEY."_pi1"
),"CType");

Interesting part is the first array containing label and classname.
Now go ahead and add the icon as third value like:

t3lib_extMgm::addPlugin(array(
  "LLL:EXT:page_php_content/locallang_db.php:tt_content.CType",
  $_EXTKEY."_pi1",
  t3lib_extMgm::extRelPath($_EXTKEY).'ext_icon.gif'
),"CType");

and you're done ;-)

I think this should be anounced anywhere so extensions with CType in future 
delivers an icon.

vg Steffen 






More information about the TYPO3-dev mailing list