/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function mymodule_menu() { 'title' => 'This is my custom page', 'page callback' => 'my_special_page', 'type' => MENU_CALLBACK, ); return $items; } function my_special_page() { return theme('my_special_page'); } function mymodule_theme($existing, $type, $theme, $path) { 'template' => 'page-my-special-page', ), ); } // //replace the whole page function mymodule_theme_registry_alter(&$theme_registry) { $theme_hook = 'page'; // my hook name // Get the path to this module $modulepath = drupal_get_path('module', 'mymodule'); // Add the module path on top in the array of paths } ?>
Comments
