Define a specific page.tpl for a page create from a module I have a module witch generates a custom page:

function my_module_basket_menu() {
  $items["my-basket"] = array(
    "title"=&gt;"My basket",
    "page callback" =&gt; "_my_basket_page",
    "access arguments" =&gt; array("access my_module_basket content"),
  );

  return $items;
}

function my_module_basket_theme($existing, $type, $theme, $path) {
  return array(
    'my_module_basket_page' =&gt; array(
      'template'  =&gt;"my_module_basket_page",
      'render element' =&gt; 'page',
      'arguments' =&gt; array("listeProducts" =&gt; NULL, "key" =&gt; $key),
    ),
  );
}

function my_module_basket_theme_registry_alter(&amp;$theme_registry) {
  $hooks = array('page');

  foreach ($hooks as $h) {
    // Add the module path on top in the array of paths
    array_unshift($theme_registry[$h]['theme paths'], drupal_get_path('module', 'my_module_basket'));
  }
}

function _my_basket_page() {
  // ...some treatment

  return theme("my_module_basket_page", $liste_produits, $key);
}


All works fine, but the problems start here: I want also to have a specific page.tpl, for example page_my_basket.tpl.php.

I tried to create a function my_module_basket_preprocess_page and change the theme there but the URL path I catch is the node of the page 404. Impossible to catch "my-basket". Any ideas? A different suggestion on how i can make it work?

EDIT 

As suggested, i changed the name of my registry_alter function. From here when i look at the url (with a dsm()), i catch the good one, not the 404. So that part is ok.

So now i have to theme two page tpl, one for the page create in the module and a second one to replace  the page.tpl.php The problem is this second page i add a function preprocess in my module :

function my_module_basket_preprocess_page(&amp;$variables, $hook){

    $alias = drupal_get_path_alias($_GET['q']);

    if ($alias == "my-basket") {
      $variables['template_files'][]  = 'page_my_basket';      
    }
}


In my hook_theme function, i have that :

function oxo_wedze_basket_theme($existing, $type, $theme, $path){

  return array(
    'my_module_basket_page' =&gt; array(
      'template'  =&gt;"my_module_basket_page",
      'arguments' =&gt; array("listeProducts" =&gt; NULL, "key" =&gt; $key)
    ),
    'page-my-basket' =&gt; array(
      'template'  =&gt;"page_my_basket",
      'render element' =&gt; 'page'
    ),
  );
}


And that don't work, i still get the standard page.tpl.php
Page templates have overrides already available based on path.

If you see template_preprocess_page() it has this code:

// Populate the page template suggestions.
if ($suggestions = theme_get_suggestions(arg(), 'page')) {
  $variables['theme_hook_suggestions'] = $suggestions;
}


and you can see that theme_get_suggestions() looks at the path and generates the template suggestions.

This means that if you have hook_menu() generate the path "my-basket" then you will be able to override its page template in your theme by naming it page--my-basket.tpl.php without having to do anything else, like use hook_theme() or manually add a template suggestion in the preprocessor, or alter the theme registry.