Created
April 18, 2012 13:24
-
-
Save jeremyboggs/2413532 to your computer and use it in GitHub Desktop.
Set parameters on $_GET to display different metadata on an Omeka's items/show template.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php head(array('title' => item('Dublin Core', 'Title'), 'bodyid'=>'items','bodyclass' => 'show')); ?> | |
<div id="primary"> | |
<!-- Our item view navigation. Sets a parameter on $_GET, so we can change what gets displayed accordingly. --> | |
<a href="<?php echo abs_item_uri(); ?>?view=transcript">View Transcript</a> | <a href="<?php echo abs_item_uri(); ?>">View Metadata</a> | |
<h1><?php echo item('Dublin Core', 'Title'); ?></h1> | |
<?php if (@$_GET['view'] == 'transcript'): ?> | |
<h2>Transcript</h2> | |
<?php echo item('Item Type Metadata', 'Text'); ?> | |
<?php else : ?> | |
<p>Other metadata fields</p> | |
<!-- The following returns all of the files associated with an item. --> | |
<div id="itemfiles" class="element"> | |
<h3><?php echo __('Files'); ?></h3> | |
<div class="element-text"><?php echo display_files_for_item(); ?></div> | |
</div> | |
<!-- If the item belongs to a collection, the following creates a link to that collection. --> | |
<?php if (item_belongs_to_collection()): ?> | |
<div id="collection" class="element"> | |
<h3><?php echo __('Collection'); ?></h3> | |
<div class="element-text"><p><?php echo link_to_collection_for_item(); ?></p></div> | |
</div> | |
<?php endif; ?> | |
<!-- The following prints a list of all tags associated with the item --> | |
<?php if (item_has_tags()): ?> | |
<div id="item-tags" class="element"> | |
<h3><?php echo __('Tags'); ?></h3> | |
<div class="element-text"><?php echo item_tags_as_string(); ?></div> | |
</div> | |
<?php endif;?> | |
<!-- The following prints a citation for this item. --> | |
<div id="item-citation" class="element"> | |
<h3><?php echo __('Citation'); ?></h3> | |
<div class="element-text"><?php echo item_citation(); ?></div> | |
</div> | |
<?php endif; ?> | |
<?php echo plugin_append_to_items_show(); ?> | |
<ul class="item-pagination navigation"> | |
<li id="previous-item" class="previous"><?php echo link_to_previous_item(); ?></li> | |
<li id="next-item" class="next"><?php echo link_to_next_item(); ?></li> | |
</ul> | |
</div><!-- end primary --> | |
<?php foot(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment