How to add a class?


#1

I am looking for information on how to add a custom class to Omeka S. Omeka Classic had “Add Item Type”, but I cannot find the equivalent for that in Omeka S. Searching the documentation did not turn up anything.

Thanks,
Dennis


#2

Classes in Omeka S are generally created as part of vocabularies. The equivalent for Item Type from Classic to S would be creating a custom resource template.

What is your use case? Maybe we can help you find a solution.


#3

Our items are brief descriptions of historical events. There is no resource associated with the item.
You could say that the item itself is the resource. So the Dublin Core properties do not apply. Instead, there are properties of the historical event (date, location, participants,…). We would like to store those properties, and have custom views for displaying a list of events and an individual event, containing just those properties.

The layout of those views should also be custom, not the default. For example, one of the properties of historical event items will be an image URL, which points to a public domain image hosted outside our website. The view for an individual item should contain an tag whose src attribute is the image URL property value.

What do you recommend?

Thanks,
Dennis


#4

In terms of unique data, labels, and order, that is what resource templates do in Omeka S. Resources in Omeka S encompass items, item sets, and media - a template you create can be used for any of these.

You can use a uri as a value for a property in Omeka S, or you could add the public domain image [https://omeka.org/s/docs/user-manual/content/items/#media](as media) , depending on your needs.

Custom views would be something you would need to manage in the theming of the public view of your site.


#5

Thank you. Now I am looking for help in learning how to do this. The developer document (https://omeka.org/s/docs/developer/) is more of a reference than a learning tool. Are there any tutorials available on developing resource templates and theming?

Thanks,
Dennis


#6

The User Manual has documentation for resource templates https://omeka.org/s/docs/user-manual/content/resource-template/ but no tutorials per se.

A good way to learn is to create a template and try experimenting with it until you get it the way you want it, then build out the rest of your items. This may take a bit, but is worth it in the long run.