Theme with support for custom item field display

I’m new to Omeka-S, and I’m trying to figure out the best way to accomplish what I’m trying to do: display item metadata on the item page in a customized way – not just a list of the metadata but using each field in a different way. Such as:

Title: instead of listing the metadata as “title: This is the Page Title”, just display the title in a prominent way at the top of the page.

Sidebar – there are maybe five fields with contact information related to the entry; I’d like to list those in a sidebar.

Main content – most of the rest of the fields, but maybe they aren’t all showing.

I could envision two ways of doing this:

  1. replace the $item->content declaration with a whole bunch of calls to individual metadata elements (I couldn’t find documentation for how to do that, but I assume it’s possible?) and sprinkle all that metadata into a page template that we’d write to do what we want.
  2. maybe there’s a template that supports portioning out a page into divs:
    Div1: Title [maybe with a checkbox that says “don’t display the field label for this one”
    Div2: put all the sidebar elements in this one (This one I’d also want to link the email and telephone items – that’s more complex).
    Div3: most of the fields
    Div4: don’t show these fields

What is a smart way to accomplish what I’m trying to do here? Is there a theme that supports that kind of behavior, or is this all just a custom item page? For a fully custom layouts, how can I call my metadata elements individually? (e.g. $item->getMetadata('FOAF','Personal mailbox')) .

This last one seems like a super-basic problem to solve, but I couldn’t find an answer in the documentation.

Thanks for your help!


It looks like the “Page Blocks” feature almost does what I want, but if I’m reading the documentation right, the information for different blocks all has to come from different records. Is that right? Is it the case that I can’t take information from the same item record and assign it to different blocks?

The info you want on displaying individual values is here in the developer documentation.

Resource Page Blocks is also almost what you want. It doesn’t require the blocks to come from different records, in fact they’re the blocks for showing a single record so they’re always about all the same one. The problem that makes it not quite as easy for your use case is that we don’t currently allow the theme to provide those blocks: they have to be already in the core or come from a module, and there aren’t options for the blocks that would let you exclude certain values.

One thing you might look at in conjunction with displaying specific values is the Hide Properties module. Hide Properties just affects what’s shown when the theme asks to display “all” properties, so you could hide the ones you’re displaying in another way (or that are already shown elsewhere, like titles) and it will just prevent duplication but not interfere with places that specific property is being displayed.

Thanks John – this is super-helpful!