I create a module and implement hook_menu():

function mymodule_menu(){
  return $items;

then I create a theme and create page.tpl.php and page--mymodule-list.tpl.php at the same directory.

now I can access http://localhost/?q=mymodule/list, but it use page.tpl.php to render the page, instead of page--mymodule-list.tpl.php.

How should I do to make it render the page with page--mymodule-list.tpl.php?

  • Have you cleared the caches since adding your template file? And do you have a copy of the core page.tpl.php in your theme as well?
    – Clive
    Nov 27, 2012 at 10:11
  • @Clive Yes, I have cleared the caches. And I found if I rename page--mymodule-list.tpl.php to page--mymodule.tpl.php, it work fine. Nov 27, 2012 at 10:14
  • this is may due to admin theme.
    – monymirza
    Nov 27, 2012 at 11:07

1 Answer 1


The 'rules' for the page.tpl.php template suggestions state you need to substitue each / in the page for 2 dashes, so your template file needs to be called:


Remember to the clear the cache again once you've made the change

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.