I am completely new to drupal, and just started learning.
Here's my issue:
I have created a module, called 'doom'. It has only one form.
I would like to remove all the default elements ( header, footer, sidebar ) and to add custom elements.
I tried this,
/**
* Implements hook_theme_registry_alter().
*/
function doom_theme_registry_alter(&$theme_registry) {
$module_path = drupal_get_path('module', 'doom');
$template_file_objects = drupal_find_theme_templates($theme_registry, '.tpl.php', $module_path);
foreach ($template_file_objects as $key => $template_file_object) {
if (!isset($theme_registry[$key]['theme path']) || !preg_match('#/themes/#', $theme_registry[$key]['theme path'])) {
$theme_registry[$key]['theme path'] = $module_path;
$theme_registry[$key] = array_merge($theme_registry[$key], $template_file_object);
$theme_registry[$key]['type'] = 'module';
}
}
}
This code changes all the pages in the site. But I just wanted to customize the template for 'doom' page. http://example.com/drupal/doom