Created
August 14, 2012 23:37
-
-
Save jeremyboggs/3353902 to your computer and use it in GitHub Desktop.
Replace the title of all items in Omeka's Exhibit Builder plugin with a different field.
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 | |
/** | |
* Replace the title of all items in Exhibit Builder with a different field. | |
* | |
* Add this to a new plugin, change the field to whatever field you want, and | |
* activate the plugin. | |
*/ | |
function exhibit_item_title_switch($title, $item) { | |
$request = Zend_Controller_Front::getInstance()->getRequest(); | |
if ($request->getModuleName() == 'exhibit-builder') { | |
// Replace title field here. | |
$title = item('Dublin Core', 'Description', null, $item); | |
} | |
return $title; | |
} | |
add_filter(array('Display', 'Item', 'Dublin Core', 'Title'), exhibit_item_title_switch); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment