Browse Source

Merge pull request #641 from MorganDawe/7.x-object-mapper-pid

Adding pid to object_mapper utility
pull/644/head
Nick Ruest 9 years ago
parent
commit
b403953b2f
  1. 3
      theme/theme.inc

3
theme/theme.inc

@ -257,6 +257,7 @@ function template_preprocess_islandora_objects(array &$variables) {
* - link: A string containing a textual HTML link to the object. * - link: A string containing a textual HTML link to the object.
* - thumb: A string containing an image HTML link to the object. * - thumb: A string containing an image HTML link to the object.
* - description: A string containing a description of the object. * - description: A string containing a description of the object.
* - pid: The object's PID.
*/ */
function islandora_objects_object_mapper($object_id) { function islandora_objects_object_mapper($object_id) {
$o = islandora_object_load($object_id); $o = islandora_object_load($object_id);
@ -289,6 +290,7 @@ function islandora_objects_object_mapper($object_id) {
'link' => l($o->label, $url, $link_options), 'link' => l($o->label, $url, $link_options),
'thumb' => l($img, $url, $link_options), 'thumb' => l($img, $url, $link_options),
'description' => $description, 'description' => $description,
'pid' => $o->id,
); );
} }
else { else {
@ -299,6 +301,7 @@ function islandora_objects_object_mapper($object_id) {
'link' => l(t('(Unknown)'), $url, $link_options), 'link' => l(t('(Unknown)'), $url, $link_options),
'thumb' => '', 'thumb' => '',
'description' => '', 'description' => '',
'pid' => $object_id,
); );
} }
} }

Loading…
Cancel
Save