Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Implements hook_preprocess_HOOK().
- */
- function MYTHEME/MYMODULE_preprocess_field(&$variables) {
- $view_mode = $variables['element']['#view_mode'];
- $field_name = $variables['element']['#field_name'];
- $bundle = $variables['element']['#bundle'];
- $variables['theme_hook_suggestions'][] = 'field__' . $field_name . '__' . $view_mode;
- $variables['theme_hook_suggestions'][] = 'field__' . $field_name . '__' . $bundle . '__' . $view_mode;
- }
Add Comment
Please, Sign In to add comment