Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function MYTHEME_preprocess_field(&$variables, $hook) {
- // 1. field--field-name--view-mode.tpl.php
- // 2. field--field-name--content-type--view-mode.tpl.php
- $element = $variables['element'];
- $variables['theme_hook_suggestions'][] = 'field__' . $element['#field_name'] . '__' . $element['#view_mode'];
- $variables['theme_hook_suggestions'][] = 'field__' . $element['#field_name'] . '__' . $element['#bundle'] . '__' . $element['#view_mode'];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement