Create module for my own datatype

rve

Joined: 2004-01-22
Posts: 6
Posted: Fri, 2008-05-23 17:55

Hi,

I would like to add a renderer for my own datatype.
I just used the mp3audio as base and went from there. I added a mime type and when I add items from my own data type it chooses the correct mimetype and renderer as seen in the debug-tree view. However, it just shows a download link and not my own rendering code.
I the debug tree I noticed gallery thinks its an GalleryUnknownItem and in my module (and the mp3audio module) there are checks to only render the file when its a GalleryDataItem. My question is, how do I tell gallery my own datatype should be treated as a GalleryDataItem and not an GalleryUnknownItem ?

Thanks,

Ralph.