Get item types under collection?

I have a navigation menu that lists my collections. Is there a way I can get a list of all item types of the items under each collection?

There is no helper function for this, but you could write one that queries the database to find out. Or you could use this code: