Disabling Links on Items Browse and Show-Omeka 2.0.2


I am trying to get modify the links on my Browse and Show items pages that link to the "?advanced..." url. Currently I have a CSS solution in place but I would prefer to fix it rather than cover it up.

On the Browse page, I would like to make the urls the same as the links on the thumbnails, to the actual file record "items/show/11".

On the Show page, I would like to remove the links on the H1 element, DC title, and DC description entirely. I think part of my problem is not fully understanding what the metadata() function is doing but I am not sure.


On the show page, the only thing I know of that would make the DC title and DC description links is the "Search By Metadata" plugin. You should be able to configure what is a link in the plugins configuration.

It doesn't affect the H1 element, though. Are there other theme customizations at work? It seems likely, and that might help us track down your other two questions, too.


The theme customizations I have made are:

-basic css changes like width, color, underline; no css scripts though

-added "?sort_field=Dublin+Core%2CTitle" to the end of the
'label' =>__('Browse All'),
'uri' => url('items/browse...
in the
application/libraries/globals.php file

-added "description column in Simple Search results in the themes/default/search/index.php file following the information here: http://omeka.org/forums/topic/adding-categories-to-simple-search-results

-turned off html filtering for simple pages in Security Settings

-edited the advanced search file at application/views/scripts/items/search-form.php to remove certain fields

The link to my omeka installation is http://earlymodernsandbox.com/projects/archive/ if it helps.


It looks like the browse page and links on the title and descriptions are working as they should, which just leaves the weird ?advanced. . . stuff being added to the h1 in items/show.php

Have you modified that file to pass in something new to metadata()?

The code that produces the h1 should look like:

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

That is strange; I did not modify that. The H1 line is exactly the same as the one in my items/show.php file

Hmm. The only thing I can think of is that somewhere a filter was created for DC Title, but if that were the case the link would be generated elsewhere in the site.

Just to double-check, are you looking at the items/show.php file in the /themes/{your-theme}/items directory, or in /application/views/scripts/items? The one you want is in the former.

Yes, I have only modified the show.php file in my theme. I double-checked the one in the application folder but nothing was modifying the h1 tag.

ok...could you post up all of what you in the show.php file in your theme?


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

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

<?php echo all_element_texts('item'); ?>

<!-- The following returns all of the files associated with an item. -->
<?php if (metadata('item', 'has files')): ?>
<div id="itemfiles" class="element">
<h3><?php echo __('Files'); ?></h3>
<?php if (get_theme_option('Item FileGallery') == 1): ?>
<div class="element-text"><?php echo item_image_gallery(); ?></div>
<?php else: ?>
<div class="element-text"><?php echo files_for_item(); ?></div>
<?php endif; ?>
<?php endif; ?>

<!-- If the item belongs to a collection, the following creates a link to that collection. -->
<?php if (metadata('item', 'Collection Name')): ?>
<div id="collection" class="element">
<h3><?php echo __('Collection'); ?></h3>
<div class="element-text"><p><?php echo link_to_collection_for_item(); ?></p></div>
<?php endif; ?>

<!-- The following prints a list of all tags associated with the item -->
<?php if (metadata('item', 'has tags')): ?>
<div id="item-tags" class="element">
<h3><?php echo __('Tags'); ?></h3>
<div class="element-text"><?php echo tag_string('item'); ?></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 metadata('item', 'citation', array('no_escape' => true)); ?></div>

<?php fire_plugin_hook('public_items_show', array('view' => $this, 'item' => $item)); ?>

<ul class="item-pagination navigation">
<li id="previous-item" class="previous"><?php echo link_to_previous_item_show(); ?>
<li id="next-item" class="next"><?php echo link_to_next_item_show(); ?>


<?php echo foot(); ?>


I believe I have found the solution. I must have installed the "Search by Metadata" plugin at some time, played with it, and then forgot about it and deleted the folder (instead of uninstalling). I reinstalled the newest version today and selected nothing. Now I do not get the weird ?queries attached the end of the urls. Sorry for the trouble!