Reordering individual metadata fields

Hello,

I'm all over the forums this week as we prepare for a redesign of our Omeka site. My question today is whether it is possible to reorder the item metadata (short of editing the core) with the purpose of emphasizing those that users will read (title, description, etc) and de-emphasizing those that are only of administrative interest (rights, contribution, item type metatdata, etc). I see that they are outputted in specific divs, so style adjustments can accomplish some of this, but reordering with CSS seems like a tricky proposition.

Any thoughts?

My guess is that this would be plugin territory or perhaps something for a future release, but just thought I would throw it out there in case there's a moderately easy way to accomplish this in the near term, perhaps with a theme function.

Hi Erin,

The easiest way to do this would be to simply forgo the use of 'show_item_metadata()' helper and instead use the 'item()' helper for each field you want to use, in the order you want to use them. So, if you wanted to use 'Title', 'Description' 'Creator', and 'Subject', in that order, you could do this:

<?php echo item('Title'); ?>
<?php echo item('Description'); ?>
<?php echo item('Creator'); ?>
<?php echo item('Subject'); ?>

This is much more verbose than using one function to display everything, but it provides a lot more flexibility for what you want to display and how. You can easily wrap these functions with any HTML you'd like.

Hope this helps,
Jeremy

If I wrap:

<?php echo item('Title'); ?>
<?php echo item('Description'); ?>
<?php echo item('Creator'); ?>
<?php echo item('Subject'); ?>

in "any HTML" what are the required files that the file should point to?

Or can I modify an existing file in the core?

from \theme\dark\items\show.php

removed:
<?php echo show_item_metadata(); ?>

and pasted in:
<?php echo item('Title'); ?>
<?php echo item('Description'); ?>
<?php echo item('Creator'); ?>
<?php echo item('Subject'); ?>

put data does not display.

Am I missing something?

How do I create an array of Subjects?

Currently, I am using:

<div class="element-text">
<div id="item-tags" class="element">
<h4><b>Subjects:</b></h4>
<?php echo item('Dublin Core', 'Subject'); ?>
</div></div>

Which only returns one subject for a record.

If I use:
<div class="element-text">
<div id="item-tags" class="element">
<h4><b>Tags:</b></h4>
<?php echo item_tags_as_string(); ?></div> </div>

More than one subject (with tag checkbox) clicked but subjects contain commas and do not import correctly via CSV.

Can I echo the array of subjects in each record using:

<div class="element-text">
<div id="item-tags" class="element">
<h4><b>Subjects:</b></h4>
<?php echo item('Dublin Core', 'Subject'); ?>
</div></div>

I am following the instructions at http://omeka.org/codex/Display_Specific_Metadata_for_an_Item to display individual element items so I could align them in two separate columns. But, like gnosis_omeka, when I removed the show_item_metadata helper and replaced it with the item helper, using this code as a test

<h2 id="item-title"><?php echo item('Dublin Core', 'Title'); ?></h2>
<p id="item-creator"><?php echo item('Dublin Core', 'Creator'); ?></p>
<div id="item-description">
    <?php echo item('Dublin Core', 'Description'); ?>
</div>

the metadata does not appear in the public page. Please advise.
Thanks, Amy

I cut and pasted this code into my site and it worked. Do you have a link to this?

Hi Aodiorne, thanks for replying. I tried it again today and it now appears OK. I tweaked the code which seemed to do the trick. Thanks, anyway!