Navigate through metadata


Scenario: I have 10 items. Half of them have the "Library" value in the Source metadata of Dublin Core and the other half have "Press" as the value in the same field.

I need to have a page showing "Library" and "Press" and then the user to be able to navigate to the relevant items by clicking accordingly. In other words, I need to navigate through Dublin Core,Source.

How could I do this?


You're looking to create this navigation as a separate page?

For just two options, a simple page with links to advanced searches for those two values is probably easiest.

You can easily get the URLs you'd need by just doing an advanced search with the "is exactly" option on that field.

John, thanks for the reply.

Yes, I want to create a separate page but the options are not two, they could be about 20. So, in one page I would like to have 20 links (Dublin Core,Source) preferably with a short description, and when a user clicks on a link (actually, clicks on Dublin Core, Source) then a new page should load containing all items that match the keyword of the clicked link.

Tried the Advanced Search method you suggested but I still feel I'm far from a solution.

I know one could say that I should use Collections may be for this kind of task but this would be a workaround for my case, since "Collection" category/entity of Omeka is reserved for documenting some other facet of information of my items...

When you say you feel you're far from a solution, what exactly do you mean?

Were you able to use the advanced search to get the results you'd want for a single value of the Source field? That much should be fairly simple, and the rest would just be collecting all the links you need.

Something like 20 values is starting to get into the realm where a plugin to do this would be more appropriate, but I'm not sure that's an avenue you want to explore.

The URL produced by Advanced Search with the options mentions above is really useful to understand what's going on but I can't understand how it can help me to automatically populate a page with all present or future "Dublin Core,Source" values, linkable, in order to get all items that match the clicked link (i.e. the clicked "Source").

No matter what, your suggestion was a step forward. Thank you very much and please keep up the good work.

Okay, so you are interested in making the page automatically update as new Source values are added.

This really is a job for a plugin.

Something very similar you could look at and probably adapt relatively easily is pobocks' SubjectBrowse plugin. Obviously, it works on Subject values, not Source values, but that's a minor change to adapt it for your needs.

Another thought, instead of having a simple page with links to the advanced search results for the "Dublin Core, Source" field, you might be able to add a filter to how the field displays on your item/show pages.

We have done this in a couple places on our site: adding a "Browse Related Items" link to the end of the description field that uses the identifier as the search term, and also hyper linking names from the people depicted field.


You might be able to add something like this to your custom.php in your theme

add_filter(array('Display', 'Item', 'Dublin Core', 'Source'), 'mytheme_display_source');

function mytheme_display_source($source, $item, $elementTextRecord)
    $sourceuri = uri("items/browse?search=&advanced[0][element_id]=48&advanced[0][type]=is+exactly&advanced[0][terms]=".$source."&submit_search=Search");
        $sourcelink='&nbsp;<a href="' . html_escape($sourceuri) . '" >'.$source.'</a>';
return $sourcelink;

I haven't test the code, so I'm not sure if would work. Also element_id=48 is the source field in my set up, but it might be different in yours.

John, I installed pobock's SubjectBrowse plugin BUT when I click "Browse by Subject" I return back to Home Page... nothing happens.

Andy thanks, will check and report back.

Andy, visited your site. It's really well written. I'm not sure I'll follow your suggestion though since the plugin John mentioned above really fits my needs (assuming that I solve an issue or two).

I would like to ask you: how did you do this zooming effect when hovering over pictures? It is really impressive.

Thanks, we put a lot of work into the site, and these forums have helped immensely. For the image zoom, we found a jquery zoom called Easy Zoom. There were a lot of choices, we just did a google search for jquery image zoom, and that was the one that we chose. Basically, we have it set up using two image derivatives that omeka creates, the fullsize and the file (original). We set the fullsize derivative to be the width of the image you see on the page, and then we try to keep the file image under 2000px wide otherwise it takes way too long to load the "zoomed" image. As far as implementing it, it's a little more complicated on our site, since we also have the image annotation plugin running on these images. However, if my memory serves me correctly, it wasn't too hard to get the zoom working without the annotation plugin, but I don't remember exactly how we did it. It was just trial and error until we got the settings right.

One thing I've found useful, is to set conditional statements in your header.php file so that you can pinpoint on which pages you have certain scripts. For example with the image zoom, we only need it on the item show pages, so I have the following in my header.php file:

<?php if ($bodyid=='items'&& $bodyclass=='show item'):?>
<?php queue_js('easyzoom', 'common/easyzoom'); ?>
<?php endif; ?>

See for more info on the queue_js function.

civilitas, you haven't provided a lot of details about your problem, but I'll take a wild guess anyway.

GitHub downloads will have a somewhat weird folder name with some random-looking characters in it when you unzip them. But, Omeka is pretty picky about the names of folders for plugins. Make sure the plugin's folder is called just "SubjectBrowse" (uninstall the one you have now before changing the folder's name).


My installation is ok. When you install this plugin, it adds a tab in the "Browse Items" page saying "Browse by Subject". Clicking this tab, I get back to home page as it is, with no "subject browsing" evident... Nevertheless, some features work ok, like the linkage of the Subject value in the "Show Item" page.

I contacted the author, David Mayo. He told me he is aware of the problem but he can't reproduce it. Just in case it might be of any help, the URL that this new "Browse by Subject" tab produces is ".../subject-browse". Trying to figure out what page is this...

Andy, many thanks for the insight in your code. Will copy, most probably ;-).


About SubjectBrowse plugin:

Update for future reference: As John suspected above, the installation SEEMED to be ok but the folder name of the plugin had a spelling error ("SubjetBrowse"). My fault. Well, the plugin installed ok, the settings were working, it was obvious that I had new functions in my test site BUT it was only partially working. This morning I checked back just to discover my typo. Plugin un-installed, folder renamed to the correct "SubjectBrowse", plugin re-installed and now works properly.