I have several custom content types with its icons configured in fti. The icons are displayed correctly in the Add menu toolbar, but in the folder_contents all my custom content types display the file icon.
How must be specified the icon to be displayed correctly in the folder_contents?
If I don't recall wrong the toolbar icons come from field icon_expr in /types/MyType.xml.
For the folder_contents you need the registry and the problem here may be camel case? Checking my types I have types like "Mytype" and the registry looks like: <record name="plone.icon.contenttype/mytype"> so I would try to change the register to <record name="plone.icon.contenttype/shippingagent"> and see if this fixes it
Anyone knows where can I find the source code for the folder_contents template? I can only find references to it in some minified files in plone.staticresources.
I have finally resolved it with the help of all you.
Thank you @sverbois@csanahuja@yurj for pointing me in the right direction.
FYI:
First of all, I must admit that in order to simplify the problem I omitted that my custom types are named with dots and some uppercase letters, like my.custom.PloneType.
After unminifying some js from plone.staticresources package (plone.app.layout was not useful) and debugging the resolveIcon function I found out that this function substitutes the dots by hyphen - and uppercase by lowercase. So the url for getting the icon is .../@@iconresolver/contenttype/my-custom-plonetype.
Therefore, I changed all the contenttype registry records according to this and the icon_expr in the fti also.