Displaying select metadata themes

Items submitted to our still in-progress site via the contribution module are showing the "deed of gift" in the "rights" section. I would like to stop it from doing that, because our deed of gift is long.

I am trying to figure out how to only show select items with the item_show_metadata function, but can not seem to wrap my head around it. (maybe I've been looking at the thing for too long!)

The examples on the API items/show page only explain how to turn of empty metadata elements. I would like to only show the following elements: Title, Contributor, Creator, Online Submission.

Can someone give me example code that will accomplish this?


Unfortunately, the show_item_metadata function does not currently have an option to specify an array of elements to show (I plan on trying to fix this in the future). Instead, you will need to use the item() helper function on your show page. For example, you could do something like this:

        $elementInfos = array(
            array('Dublin Core', 'Title'),
            array('Dublin Core', 'Creator'),
            array('Dublin Core', 'Contributor'),
            array('Contribution Form', 'Online Submission'),

        foreach($elementInfos as $elementInfo) {
            $elementSetName = $elementInfo[0];
            $elementName = $elementInfo[1];
            $elementTexts = item($elementSetName, $elementName, 'all');
            if (!empty($elementTexts)) {
                echo '<h3>' . html_escape($elementName)  .'</h3>';
                foreach($elementTexts as $elementText) {
                    echo '<p>' . html_escape($elementText) . '</p>';


Let me know if this helps.

Thanks, Will! That seems to have worked excellently (although the html_escape wasn't necessary).

Was I misreading the comments in the helper file for this function? It seemed to imply that you could already call specific elements by way of an array in the arguments to the function.

No problem.

I believe the show_item_metadata helper function currently allows you specify an element set, but not specific elements within or across element sets.

Gotcha. That's probably what was confusing me! Thanks again for your help.