Associate a file with a collection

Is there an easy way to associate a file with a collection?

My idea is to add a new form tab on the collections edit page with this field:


Through this field a user can associate a file with the collection (in the same way that happens with the items).

Should I copy the entire set of processes running on the items or is there an easier way to do it?

Thanks in advance.

There is no easy way to associate a file with a collection, you’ll need your own system for doing that.

In particular, the way files are stored in the Omeka database requires a connection to an item, and doesn’t allow one to a collection. A plugin can still attach files to collections with its own database set up, but you’ll be rolling your own implementation, more or less.

Okay, well, I’ll try to develop my own system.

Thank you very much for the reply.


Hi, @gon.
If you managed to do it, and could turn it into a plugin, that could be quite useful.
Good luck.

Here’s a very simple plugin you could use to add display parameters like an image URL to a collection. It’s not ideal but it works.

Not sure if this meets your needs but there is a plug-in Shortcode Anyfile that allows you to insert an image file from an item or your theme’s image directory anywhere you can add a shortcode.

@jflatnes @wmcowan @DanieleB @ebellempire
Thank you for replying ! Appreciate it.

I’ve managed to implement this functionality developing this plugin:

Most of the code has been copied from the Omeka system used by the items. I’ve developed it in a hurry so maybe it has some bugs.

Some screenshots :

I make it public for those who find it useful!

Thanks again!

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.