You are here

function asset_field_formatter in Asset 6

Same name and namespace in other branches
  1. 5.2 modules/asset_content.inc \asset_field_formatter()
  2. 5 modules/asset_content.inc \asset_field_formatter()

Prepare an individual item for viewing in a browser.

File

modules/asset_content.inc, line 60

Code

function asset_field_formatter($field, $item, $formatter, $node) {
  $teaser = arg(0) == 'node' && is_numeric(arg(1)) ? FALSE : TRUE;
  if (!empty($item['aid'])) {
    return asset_lightbox(array(
      $item,
    ), FALSE, $teaser);
  }
}