Skip to content

Instantly share code, notes, and snippets.

@katharinehe
Created August 20, 2016 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katharinehe/6add9d8942274bf81cee7fe421e4646b to your computer and use it in GitHub Desktop.
Save katharinehe/6add9d8942274bf81cee7fe421e4646b to your computer and use it in GitHub Desktop.
This is the php file for displaying individual Omeka items, I cannot get it to print Item Type Metadata at the top of the page
<?php echo head(array('title' => metadata('item', array('Dublin Core', 'Title')),'bodyclass' => 'items show')); ?>
<div id="primary">
<!-- Prints the title of the item as assigned in Omeka user interface in h1 format -->
<?php if (metadata('item','has tags')): ?>
<?php endif;?>
<!-- Print Dublin Core elements that are not empty -->
<h1><?php echo metadata('item', array('Dublin Core','Title')); ?></h1>
<!-- Items metadata -->
<div id="item-metadata">
<?php echo all_element_texts('item'); ?>
</div>
<!-- Prints thumbnails of images or files in that item -->
<h3><?php echo __('Files'); ?></h3>
<div id="item-images">
<?php echo files_for_item(); ?>
</div>
<!-- Prints title "collection" and link to collections for that item-->
<?php if(metadata('item','Collection Name')): ?>
<div id="collection" class="element">
<h3><?php echo __('Collection'); ?></h3>
<div class="element-text"><?php echo link_to_collection_for_item(); ?></div>
</div>
<?php endif; ?>
<!-- Prints the tags associated with the item -->
<div id="item-tags" class="element">
<h3><?php echo __('Tags'); ?></h3>
<div class="element-text"><?php echo tag_string('item'); ?></div>
</div>
<!-- The following prints a full citation for this item. -->
<div id="item-citation" class="element">
<h3><?php echo __('Citation'); ?></h3>
<div class="element-text"><?php echo metadata('item','citation',array('no_escape'=>true)); ?></div>
</div>
<?php fire_plugin_hook('public_items_show', array('view' => $this, 'item' => $item)); ?>
<!-- Navigation links for previous and next item -->
<ul class="item-pagination navigation">
<li id="previous-item" class="previous"><?php echo link_to_previous_item_show(); ?></li>
<li id="next-item" class="next"><?php echo link_to_next_item_show(); ?></li>
</ul>
</div> <!-- End of Primary. -->
<?php echo foot(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment