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. 11
      plugins/pidfield/pidfield.module

11
plugins/pidfield/pidfield.module

@ -276,11 +276,14 @@ function theme_pidfield_formatter_default($element) {
//return $element['#item']['safe']; //return $element['#item']['safe'];
$pid = $element['#item']['safe']; $pid = $element['#item']['safe'];
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); if(!empty($pid)) {
$item = new Fedora_Item($pid); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$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;
} }
/** /**

Loading…
Cancel
Save