Currently process functions names are: template_preprocess_booking_timeslots_month, template_preprocess_booking_timeslots_week and template_preprocess_booking_timeslots_day.
Theme files are: calendar-day.tpl.php, calendar-month.tpl.php and calendar-week.tpl.php.
Those preprocess functions are too global and are called for every calendar View.
But when you change the theme filenames to: calendar-day--booking-calendar.tpl.php, calendar-month--booking-calendar.tpl.php and calendar-week--booking-calendar.tpl.php (where booking_calendar is your calendar Views name), you expecting that those preprocess functions are not called for every calendar View (currently are hardcoded).
Function booking_timeslots_theme_registry_alter() should detect if the Booking Calendar contain specified TPL files used by Booking Timeslots and add preprocess functions to the right place.
Check the views/plugins/views_plugin_display.inc for example how to detect those TPL files.
$plugin = $this->get_plugin();
if ($plugin) {
$funcs[] = $this->option_link(t('Style output'), 'analyze-theme-style') . ': ' . $this->format_themes($plugin->theme_functions(), $plugin->additional_theme_functions());
$themes = $plugin->additional_theme_functions();
if ($themes) {
foreach ($themes as $theme) {
$funcs[] = $this->option_link(t('Alternative style'), 'analyze-theme-style') . ': ' . $this->format_themes($theme);
}
}
Comments
Comment #1
kenorb commentedUPDATE: When you change the TPL name, current hardcoded preprocess function is not called.
Comment #2
kenorb commentedFixed in 7.x by re-writing the logic.