You are here

function date_ical_preprocess_date_ical in Date iCal 7

Technique borrowed from Display Suite module. Add ical template suggestions to all types of entities.

1 string reference to 'date_ical_preprocess_date_ical'
date_ical_theme_registry_alter in ./date_ical.module
Implements hook_theme_registry_alter().

File

./date_ical.module, line 177
Adds ical functionality to Views.

Code

function date_ical_preprocess_date_ical(&$vars) {
  if (isset($vars['elements']) && isset($vars['elements']['#entity_type']) && isset($vars['elements']['#bundle']) && isset($vars['view_mode']) && $vars['view_mode'] == 'ical') {
    $vars['theme_hook_suggestions'][] = $vars['elements']['#entity_type'] . '__ical';
    $vars['theme_hook_suggestions'][] = $vars['elements']['#entity_type'] . '__' . $vars['elements']['#bundle'] . '__ical';
  }
}