Skip to content

Instantly share code, notes, and snippets.

@katharinehe katharinehe/show.php
Created Aug 20, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.