Skip to content

Instantly share code, notes, and snippets.

@asanchez75
Created October 11, 2012 15:00
Show Gist options
  • Save asanchez75/3872985 to your computer and use it in GitHub Desktop.
Save asanchez75/3872985 to your computer and use it in GitHub Desktop.
Drupal formatters
$items = $variables['#items'];
foreach ($items as $item) {
$uids[] = $item['uid'];
}
$args = implode(',', $uids);
if (module_exists('views')) {
return views_embed_view('staff', 'block', $args);
}
else {
return drupal_set_message(t('You have to enable Views module and create a views block named equipo with table style'));
}
============================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment