Browse Source

Don't render PID field unless a pid is present, as it displays the default collection object.

pull/105/head
Zachary Howarth 14 years ago
parent
commit
7941b435d5
  1. 3
      plugins/pidfield/pidfield.module

3
plugins/pidfield/pidfield.module

@ -276,12 +276,15 @@ function theme_pidfield_formatter_default($element) {
//return $element['#item']['safe']; //return $element['#item']['safe'];
$pid = $element['#item']['safe']; $pid = $element['#item']['safe'];
if(!empty($pid)) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$item = new Fedora_Item($pid); $item = new Fedora_Item($pid);
return fedora_repository_get_items($pid); return fedora_repository_get_items($pid);
//return $item->objectProfile->objLabel; //return $item->objectProfile->objLabel;
} }
return null;
}
/** /**
* Theme function for 'plain' example field formatter. * Theme function for 'plain' example field formatter.

Loading…
Cancel
Save