Hiccup on Items Pages

Hi there,
For some reason, images and metadata fields (like title) are showing up twice on item public pages. Any advice on correcting this would be much appreciated.


Thanks so much!

You've obviously customized your theme somewhat.

Posting your code for your items/show.php would help people tell why things are printing twice.

John, thanks for your quick reply, but no - didn't do any customizing of the theme. I'm new to php and therefore only do basic editing of the code.

Here's the code for my items/show.php file through the items metadata function:

<?php head(array('title' => item('Dublin Core', 'Title'))); ?>

<div id="primary-items">

<h1><?php echo item('Dublin Core', 'Title'); ?></h1>

<div class="indent">

<?php if (item_has_thumbnail()): ?>
<div class="item-img-solo">
<?php echo link_to_item(item_square_thumbnail()); ?>
<?php endif; ?>

<h3>All Titles</h3>
<ul class="title-list">
<?php foreach (item('Dublin Core', 'Title', 'all') as $title): ?>
<li class="item-title">
<?php echo $title; ?>

<?php endforeach ?>

<!-- The following function prints all the the metadata associated with an item: Dublin Core, extra element sets, etc. See http://omeka.org/codex or the examples on items/browse for information on how to print only select metadata fields. -->
<?php echo show_item_metadata(); ?>

<!-- The following returns all of the files associated with an item. -->
<div id="itemfiles" class="element">
<div class="element-text"><?php echo display_files_for_item(); ?></div>

And thanks again for any help.

Actually, was able to fix the image problem by commenting out the command to echo the thumbnail: <!--<?php echo link_to_item(item_square_thumbnail()); ?>-->

The "All Titles" part is the main source of the double printing.

You could delete everything from the <h3>All Titles</h3> to the <?php endforeach ?>, which will get rid of that extra printing entirely for titles.

The "first" title is also used in the <h1>. People often want that particular duplication, but you could remove that also if you wanted.

show_item_metadata will print all the Element metadata for the item, including Titles and anything else from the Dublin Core, Item Type metadata, or other element sets.

Thanks so much, John. I was able to pare down with your suggestions.