I'm working on some customizations to a theme in a Neatline exhibit, and I'm looking for a way to present a list of values from a single metadata element, de-dupe the values, and hyperlink them to a search result page in Omeka.
Here's a link to the site in it's current (and very early) state: http://neatline.ohio5.org/sandbox.
I've installed the Search by Metadata plugin which works great for values in metadata fields on individual item records that appear in the bubble when a user clicks on the plotted points on the map, but I'm trying to present the full list of values (de-duped) from a specific metadata element. Imagine a simple list of clickable values from a single metadata element.
I'm following instructions for creating exhibit-specific Neatline themes here: http://neatline.org/2014/04/01/creating-themes-for-individual-neatline-exhibits/. Based on these, I understand I can modify the show.php file in this exhibit-specific directory to alter some of the layouts of the site. I've tried adding some php to the show.php file, but I keep running into "undefined function" php errors so I'm not sure how to make the custom show.php aware of these functions. Where are they defined?
After failing repeatedly to get the metadata from a specific element type (we have an element called "Participants" we're trying to get), I decided to see if I could get any php to work so I tried calling the get_tags function described here: http://omeka.org/codex/Functions/get_tags, but this resulted in the following:
"Fatal Error : Call to undefined function get_tags() ...."
Here's an excerpt from my show.php file which resides at ../[omeka-theme]/neatline/exhibits/themes/[exhibit-slug]
<!-- Narrative -->
<div id="neatline-narrative" class="narrative">
<header>
<!-- Credits. -->
<!--<span>">← View all</span> • -->
<span>Home</span> •
<span>About</span> •
<span>Contributors</span> •
<span>Bibliography</span>
</header>
<!-- Content. -->
<h1 class="exhibit-title"><?php echo nl_getExhibitField('title'); ?></h1>
<?php echo nl_getExhibitField('narrative'); ?>
<!-- This is an experiment. Adding in collapsible navigation for tags -->
<div class="accordion" id="accordion2">
<div class="accordion-group">
<div class="accordion-item">
<div class="accordion-heading-panel">
<h3>Cast of Characters</h3>
</div> <!-- /end .accordion-heading" -->
<div id="collapseOne" class="accordion-body collapse">
<div class="accordion-inner-panel">
<?php $tags = get_tags(array('sort' => 'alpha'), 20);
echo tag_cloud($tags, 'items/browse'); ?>
</div> <!-- /end .accordion-inner -->
</div> <!-- /end #collapseOne -->
</div> <!-- /end .accordion-item -->
</div>
</div>
</div>
I'm not a PHP coder, but I know enough to be dangerous, and I suspect that's part of my problem...
Any guidance would be greatly appreciated.