Re-label Dublin Core fields in 2.0

Hi everyone,

I've been searching the forums for a solution but I have not found it just yet for version 2.0. I want to change the labels in the public display of Dublin Core fields. I've been editing in Common/Record-metadata.php

Ex: I wanted the Description field to display: "Text on Item". In version 1.5, I went to items/show and added this:

<?php $var_Description = item('Dublin Core', 'Description');
if (empty($var_Description)): ?>
<?php else: ?>
<div class="element">
Text on Item
<div class="element-text">
<?php echo $var_Description; ?>
<?php endif; ?>

And this worked perfectly until the upgrade.
Any advice you can give would be wonderful.

The various different functions in 1.x for return data about record (e.g., item(), collection(), etc) have been generalized into one function, metadata() in 2.x.

The new structure would be like:

$var_Description = metadata('item', array('Dublin Core', 'Description'));

Thank you very much.
Your solution worked perfectly!


I have version 2.1.2 and I previously used the above solution in the 2.0 Seasons theme, but now when I add this to the updated version in application/views/scripts/common/record-metadata.php, the item/show page does not look right.
The "Collection" and "Citation" sidebars all move into the one box where the item information is, along with my blue footer and the Prev/Next navigation.

Here is a screenshot:

And here is a sample of the code that I created for each Dublin Core metadata field:

<div><?php $var_Contributor = metadata('item', array('Dublin Core', 'Contributor'));
if (empty($var_Contributor)): ?>
<?php else: ?>
<div class="element">
<div class="element-text">
<?php echo $var_Contributor; ?>
<?php endif; ?>

Also, when I add this to record-metadata.php, my collection/show page does not display and I get an Omeka error message page instead. Does anyone have any suggestions for what I may be doing wrong?

Many thanks!