Forum OpenACS Development: Re: Icons for CR_MIME_TYPES (relates to Media Package)

Collapse
Posted by Tom Jackson on

Icons is one of the things I wanted to use the Media Package for.

So far I have looked at the image content_type and the file-storage package (and content_type). I have yet to figure out how I can use CR to easily represent the rich variety of content types (their attributes) without hand writing lots of pl code. Both image and file-storage, and extlink, have lots of hand written code, much more than I am willing to invest in a generic package. They also have datamodel, and I got a few comments that using the CR would be relatively free from that.

From what I can figure, I would only have one content_type in CR: media_type. But I need a separate datamodel for each type. It seems that if I use the CR I'll have to do 3 or more separate lookups to get to the media, since CR already requires two. What I need for the Media Package is to be able to calculate the url of a Media object without a database lookup (assuming it exists), or to provide a list of media types and the number of media of each type in a single lookup.