View/Template for browse results?

Is there a view or template for browse results similar to the one for items? I need to display more than the title and description in the listing.

Steve

What kind of browse results? Omeka has many "browse" pages.

In the browse listing for search results on the public-facing side. Title and Description display by default, but I want to add other metadata elements.

Thanks

What's the URL? The site-wide search results page doesn't show a Description element to my knowledge, just a title and the type of record. Anyway, that template is search/index.php.

If you're talking about the item-specific search results, that just uses the same template: items/browse.php.

Its the browse results from the advanced search (items only).

http://folks.pairserver.com/omeka/omeka-2.0.2/items/browse?search=&advanced%5B0%5D%5Belement_id%5D=38&advanced%5B0%5D%5Btype%5D=contains&advanced%5B0%5D%5Bterms%5D=Appalachia&range=&collection=&type=&user=&tags=&public=&featured=&submit_search=Search

I'm seeing title and description being displayed.

browse.php does not appear in any of the theme php pages. I do see this: application/views/scripts/items/browse.php

This appears to be the template generating the listing displaying the DC Title and DC Description for the Advanced Search.

application/views/scripts/items/browse.php is the view/template I wanted to modify the output of the item-specific search results. I've successfully added DC Subject (looping through them).

I replaced the existing code

<?php if ($subject = metadata('item', array('Dublin Core', 'Subject'), array('snippet'=>250))): ?>
    <div class="item-subject">
        <?php echo $subject; ?>
    </div>
    <?php endif; ?>

with the following code

<?php if( $subjects = metadata('item', array('Dublin Core', 'Subject'), array('all' => true))): ?>
    <div class="item-subjects-list">
    <?php

     foreach ($subjects as $subject) {
    	$subject_links[] = '<span class="item-subject">' . "<a href='http://folks.pairserver.com/omeka/omeka-2.0.2/items/browse?search=&advanced%5B0%5D%5Belement_id%5D=49&advanced%5B0%5D%5Btype%5D=is+exactly&advanced%5B0%5D%5Bterms%5D=$subject&range=&collection=&type=&user=&tags=&public=&featured=&submit_search=Search'>$subject</a> ".'</span>';
    }
    echo join(' / ', $subject_links);
?>
	</div>
    <?php endif; ?>

Example: Output for item-specific search using Coverage contains Appalachia
http://folks.pairserver.com/omeka/omeka-2.0.2/items/browse?search=&advanced%5B0%5D%5Belement_id%5D=38&advanced%5B0%5D%5Btype%5D=contains&advanced%5B0%5D%5Bterms%5D=Appalachia&range=&collection=&type=&user=&tags=&public=&featured=&submit_search=Search

Thanks!

I did similarly, for contributors and date--except your join by slash is much more elegant than my add a comma while $count is less than 1.

<?php if ($contributor = metadata('item', array('Dublin Core', 'Contributor'))): ?>
<div class="item-contributor"><p><?php echo __('Contributors'); ?>:
	   <?php if (count(metadata('item', array('Dublin Core', 'Contributor'), array('all' => true))) > 1): ?>
		   <?php  $contrib = metadata('item', array('Dublin Core', 'Contributor'), array('all' => true)); ?>
		   <?php $count = sizeof($contrib);?>
		   <?php foreach ($contrib as $c): ?>
			  <?php if ($count > 1): ?>
					<?php  echo "$c, "; ?>
					<?php $count -= 1; ?>
			  <?php else: ?>
					<?php  echo "$c"; ?>
				<?php endif; ?>
		   <?php endforeach; ?>

	   <?php else: ?>
			<?php echo $contributor; ?>
	   <?php endif; ?>
</div>
<?php endif; ?>

<?php if ($date = metadata('item', array('Dublin Core', 'Date'))): ?>
<div class="item-description"><p><?php echo __('Date'); ?>:
	<?php echo $date; ?>
</div>
<?php endif; ?>

Doh! There is a bug in my code. Need to empty the array before generating each set of subject links, otherwise they build up!

unset($subject_links);
     foreach ($subjects as $subject) {

Just FYI, you can do this by using the Search by Metadata plugin. It supplies a filter which affects the output of metadata element texts by the metadata() function everywhere. It is also easy for administrators to configure, by choosing the elements they wish to make into search links, and integrates with Simple Vocab to provide values for the texts.

My code in browse.php looks like this now (with the Search by Metadata plugin installed, active and configured to link DC Subject):

<?php
    unset($subject_links);
     foreach ($subjects as $subject) {
    	$subject_links[] = '<span class="item-subject">' . $subject .'</span>';
    }
    echo join(' / ', $subject_links);
?>

Using join() is an old perl trick. :)