Collection Tree Metadata

Just wondering if there is a way of adding extra non Dublin Core metadata to a collection, as we are using collection tree to define a hierarchy of collections within organisations.

-Org 1
--Col 1
--Col 2
-Org 2
--Col 1
--Col 2

I would like to add additional metadata to each collection that will be an organisation (parent) such as date established, address, contact details etc. so that this can be displayed in the item show.php.

As far as I can see I can only add Dublin Core, but this does not cater for my needs.

I could potentially use the incorrect unused fields as a workaround but this wouldn't be suitable for us to do if in the future we will harvest our Omeka to a repository or for xml outputs, which is almost certainly likely.

Are there any other methods or advice I could get?

Thanks, Patrick.

I think Publisher would be an appropriate field to use, here. If you want to be able to machine-parse it in the XML, you could establish conventions for formatting, e.g. First instances is Org Name, second instance ("Add Input") is Date Established, etc. Alternately, you could separate the different sub-elements with a semi-colon or similar. (I usually use a pipe when doing this on the back end, but that's ugly for the users.)

If that's unacceptable, you might be able to add a collection Item Type ( ) and then create a custom admin theme which displays those elements in /collections/form.php

Count my vote as YES for including Collections as an editable item type by default. I can definitely imaging cases where the metadata would *not* make sense to include in the publisher field.

Thanks for the repy sheepeeh, I've actually tried the Organisation as an item type, it does potentially do it but dont really want to be adding the orgs as items.

I know it goes against the dublin core schema, but if I added some extra arrays to the Dublin Core Extended pluging in elements.php will these then show as extra available metadata in Collections mets and will I be able to pull them through in show.php in the same way as other metadata.?

I know its not an ideal solution especially when I may be exporting to xml at some point.

Had a little play about thought I could just append elements.php with the extra arrays did manage to get them to display but something wasnt right but now have seemed to have messed something up so uninstalled the plugin, removed the directory and tried putting the default plugin back in but now get the following message:

Omeka has encountered an error


    Mysqli statement execute error : Duplicate entry '1-Alternative Title' for key 'name_element_set_id'
#0 /var/www/html/repo/application/libraries/Zend/Db/Statement.php(303): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /var/www/html/repo/application/libraries/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#2 [internal function]: Zend_Db_Adapter_Abstract->query('?              ...', Array)
#3 /var/www/html/repo/application/libraries/Omeka/Db.php(79): call_user_func_array(Array, Array)
#4 /var/www/html/repo/plugins/DublinCoreExtended/DublinCoreExtendedPlugin.php(58): Omeka_Db->__call('query', Array)
#5 /var/www/html/repo/plugins/DublinCoreExtended/DublinCoreExtendedPlugin.php(58): Omeka_Db->query('?              ...', Array)
#6 [internal function]: DublinCoreExtendedPlugin->hookInstall(Array)
#7 /var/www/html/repo/application/libraries/Omeka/Plugin/Broker.php(145): call_user_func(Array, Array)
#8 /var/www/html/repo/application/libraries/Omeka/Plugin/Installer.php(130): Omeka_Plugin_Broker->callHook('install', Array, Object(Plugin))
#9 /var/www/html/repo/application/controllers/PluginsController.php(77): Omeka_Plugin_Installer->install(Object(Plugin))
#10 /var/www/html/repo/application/libraries/Zend/Controller/Action.php(516): PluginsController->installAction()
#11 /var/www/html/repo/application/libraries/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('installAction')
#12 /var/www/html/repo/application/libraries/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#13 /var/www/html/repo/application/libraries/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#14 /var/www/html/repo/application/libraries/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#15 /var/www/html/repo/application/libraries/Omeka/Application.php(79): Zend_Application->run()
#16 /var/www/html/repo/admin/index.php(28): Omeka_Application->run()
#17 {main}

Forgot to say that I get this error when I press the install button for Dublin Core Extended in plugins.

Iave even tried updating to latest release from previous but no joy.

Everything else is working as expected.

I can't speak to the DC Extended plugin, because I've never used it. But I'm really curious as to your reason for not including this information in the Publisher field? If it's because the organization is a donor rather than the collector, then Contributor might be a reasonable place to put it.

Thanks for your reply, I was a little confused about your original reply as I am by no means any better than average at best with php.

If I put all of the information (12 different fields of info) just into the publisher fields for a Collection, how would I go about displaying it on my item, I know I would use <?php echo metadata('item', array('Dublin Core', 'Publisher')); ?> but how would I be able to differentiate between say the Address and the telephone number for example?

Just going back to the error I posted, I no longer have Dublin Core Extended installed as I can't get it installed, however when I look at Settings > Element Sets > Dublin Core > Edit, I now have the complete list of Dublin Core plus the extended Elements plus the additional Elements I tried to create, so I have somehow forced all of these elements into the default list of 15 elements used by Omeka as standard.

Maybe I'm not correctly understanding what it is you want to do. Do you want to record all information, but suppress some of it from view (show address, but suppress telephone number, for instance?), or do you want all of it to be visible? If all of it can be visible, and you are not specifically hiding any elements, all instances of the publisher field will be displayed automatically, in the order which they appear on the collection edit page--no custom PHP required.


Yeah I see what you mean, I was thinking more along the lines of wanting to display different fields in different parts of the page not just in one block.

Ah, yes, that would be more complicated, partly just because show.php shows all elements by default, so you would have to write a custom collections/show.php in your theme that went through the elements individually. You could then separate out your different publisher elements using if statements.

Thanks, yes that sounds more like what I'm trying to accomplish.

I'd only be adding these fields to the Collections that are parents to the proper collection so I assume if publisher was left blank then nothing would appear and also I assume if I wanted to label each field the same in the template then they would have to be in the same order for every organisation collection.

How the values appear, and whether field titles show up when you have no value, depends on how you setup your template.

If you're new to PHP and new to Omeka theming, I'd recommend playing around with some of the code suggestions already available in the forums to get a feel for how wrangling metadata works. E.g.

Good luck!

Got the issue sorted, deleted the duplicate extended fields from the database. I then added some extra metadata fields to the same set as the Dublin Core and its now usable.

Just wondering how to go about creating an individual template for a specific item type, rather than using generic item/show.php and would the same method apply for creating a seperate collection template as well.

I wouldn't want to lose the generic templates.