function template_preprocess_asset__document__widget_search in Asset 7
Preprocess variables for asset--document--widget-search.tpl.php.
See also
asset--document--widget-search.tpl.php
File
- modules/
asset_widget/ theme/ theme.inc, line 229 - Module related preprocesses and theme overrides.
Code
function template_preprocess_asset__document__widget_search(&$vars) {
$description = field_get_items('asset', $vars['asset'], 'field_asset_document_desc');
if (!empty($description[0]['value'])) {
$vars['short_description'] = field_view_value('asset', $vars['asset'], 'field_asset_document_desc', $description[0], array(
'type' => 'text_trimmed',
'settings' => array(
'trim_length' => '140',
),
));
}
}