I know this issue is covered quite well, but at the moment I'm really perplexed on this.

First, I'm using the Zen theme. In my template folder I've created page-music.tpl.php, page-gallery.tpl.php, page-bio.tpl.php, page-front.tpl.php, and so on. I've tried putting the code in the template.php for the custom pages, but I can't redefine the zen_preprocess_page() function. The custom pages won't render the admin menu module, or display the modules properly for that matter. The JavaScript code is all funky.

I'm not sure if I'm using the right code for the the template.php. There seems to be a lot of jumbled imformation on this matter.

  • What you want to accomplished? Maybe you should try using Panels or want to want to get?
    – Codium
    Jul 23, 2011 at 17:52
  • 2
    So what is the actual question? :)
    – googletorp
    Jul 23, 2011 at 17:53
  • I want to have many page-.....tpl.php's specified for specific pages;total custom template not just for the content, but for the whole page. It seems I can't use CCK/admin menu/ other modules on it. The custom pages aren't rendering the regular functionality properly. I want it to have the same functionality as the regular page.tpl.php. I just think I'm doing something wrong defining the new pages in the template.php.
    – Graham
    Jul 23, 2011 at 18:33

1 Answer 1


If you have path like contact then the page-contact.tpl.php will be automatically available (view the theming documentation).

You can also declare your own tpl with this code (put this in a custom.module):

function custom_menu() {
  $items = array();
  $items['contact'] = array(
    'title' => 'Contact us',
    'page callback' => 'custom_make_section',
    'access arguments' => array('access content'),
    'type' => MENU_NORMAL_ITEM,
  return $items;

function custom_make_section() {

Also a little bit easier is using the module Empty Page in order to create the custom paths you want and then these paths will provide the page-....tpl.php you need.

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.