How to customize property label and display?


I’m building a site with items that have 20 - 30 metadata properties each. I’d like to customize the way those are displayed, but I can’t figure out if this is possible without hacking. Perhaps I’m missing something obvious, and if so I apologize…

For example, I have some properties from a custom ontology with very long labels. When displaying the item on the site, I’d like users to see something shorter. I added a shorter label as an “Alternate Label” in the resource template, but that doesn’t seem to show up on the public side.

Similarly, I have some properties where the data is a URL and I’d like to make that a clickable link. I hoped that setting the data type to URI would accomplish this, but it doesn’t seem to.

Any suggestions?


Values that are URI data types are clickable links when displayed. Could you share more about what you tried to do that didn’t have that result? Just changed it in the template after already adding items (template changes like that affect newly-created values only).

The alternate labels should be used on both the admin and public sides… was the item you were looking at using the template you edited?

(template changes like that affect newly-created values only)

This is good information and may point to my problem – or maybe not (but it’s good information anyway!)

Originally, I CSV-imported a bunch of items and then set their Resource Template after the fact.

Based on your information, I batch-deleted the URL values and did a new CSV-import to append these new values to the existing records, mapping them to the appropriate property in the resource template.

However, the URL is still being treated as plain text in both the admin and the public side.

I’m having similar problems with other data types. With the “Numeric Data Types” module, I’m also trying to set some properties as dates and integers, but it all appears to be plain text, which I can tell because I don’t get the date or integer editors on these properties like I do when I create a new date or integer value manually. Also, in the SQL database the “type” column is “literal” for all of these imported values.

So is there maybe something I should be doing in the CSV to specify different data types?

Yes, the CSV Import is the key aspect here.

When mapping, for each column there’s an options “wrench” icon where you can pick what data type it is imported as.

OK, that helped! Thanks! Setting it to “Import as URL Reference” produced the desired behavior. I’d seen that option before, but I thought it was expecting URL references to other Omeka items.

Now, the only options I see there for data types are “Text (default)”, “URL Reference”, and “Omeka S Resource ID”.

Should there be options there for integers, dates, and other data types? I’m using both the Numeric Types and the RDF Datatype modules, both of which make new data types available in resource templates.