Hi

i tried to overwrite the maintenance-countdown-page.tpl.php by copying the file in my templates folder that worked for other template files well but not for this. Currently i have to make the changes in the modules template file. Not the best if i install updates of the module.

Would be great to get an idea where i can look for the source of the problem or if others have the same issue.

Comments

fox_01’s picture

I think i could be located in the file mcd.countdown.inc

if (isset($theme_registry['maintenance_page']) && !defined('MAINTENANCE_MODE')) {
    $theme_registry['maintenance_page']['path'] = drupal_get_path('module', 'mcd');
    $theme_registry['maintenance_page']['template'] = 'maintenance-countdown-page';

But i dont know how this should be that all sources of template files are queried for template overwrites.

EllECTRONC’s picture

Hi,
You can't override maintenance-countdown-page.tpl.php, but you can override the 'TEMPLATE_preprocess_maintenance_page' function.

fox_01’s picture

Category: bug » support
Status: Active » Fixed

Thanks thats a good advice

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

velpan’s picture

To change default template maintenance-countdown-page.tpl.php with my own version and put it inside my subtheme, I put this code at template.php


function MY_THEME_theme_registry_alter(&$theme_registry) {
  if (variable_get('maintenance_mode', 0)) { 
     if (isset($theme_registry['maintenance_page']) && !defined('MAINTENANCE_MODE')) { 
	$theme_registry['maintenance_page']['theme path'] = drupal_get_path('theme', 'MY_THEME');
        $theme_registry['maintenance_page']['path'] = drupal_get_path('theme', 'MY_THEME').'/templates';
        $theme_registry['maintenance_page']['template'] = 'my-maintenance-countdown-page';
     }
  }
}

Many thanks to developer for this module.