Index: asset_content.inc =================================================================== --- asset_content.inc (revision 250) +++ asset_content.inc (working copy) @@ -52,6 +52,18 @@ 'label' => 'Default', 'field types' => array('asset'), ), + 'aid' => array( + 'label' => 'Asset aid', + 'field types' => array('asset'), + ), + 'filepath' => array( + 'label' => 'Asset filepath', + 'field types' => array('asset'), + ), + 'full' => array( + 'label' => 'Full asset', + 'field types' => array('asset'), + ), ); } @@ -59,8 +71,28 @@ * Prepare an individual item for viewing in a browser. */ function asset_field_formatter($field, $item, $formatter, $node) { - if(!empty($item['aid'])) { - return asset_lightbox(array($item)); + switch ($formatter) { + case 'aid': + if(!empty($item['aid'])) { + return $item['aid']; + } + case 'filepath': + if(!empty($item['aid'])) { + $asset = asset_load($item['aid']); + return $asset->filepath; + break; + } + case 'full': + if(!empty($item['aid'])) { + $asset = asset_load($item['aid']); + $item['filepath'] = $asset->filepath; + return $item; + break; + } + default: + if(!empty($item['aid'])) { + return asset_lightbox(array($item)); + } } }