title: How to create custom pages (Drupal 6.x)
body: <p>In the <strong>template.php</strong> file I inserted the code below:
  I found a tutorial online that gives the code, but I'm confused on how to get it to work.</p>
  
  <p>I copied the code below and inserted it into the <strong>template.php</strong> from the theme <strong>HTML5_base</strong>.
  I duplicated the <strong>page.tpl.php</strong> file and created custom pages -- <strong><em>page-gallery.tpl.php</em></strong> and <strong><em>page-articles.tpl.php</em></strong>. I inserted some text to the files just see that I've navigated to the pages w/ the changes. It looks like Drupal is not recognizing gallery.tpl.php and page-articles.tpl.php.</p>
  
  <p><strong>In the template.php there are the following functions:</strong></p>
  
  <p>html5_base_preprocess_page()</p>
  
  <p>html5_base_preprocess_node() </p>
  
  <p>html5_base_preprocess_block()</p>
  
  <p><strong>In the tutorial it uses these functions</strong>:</p>
  
  <p>phptemplate_preprocess_page()</p>
  
  <p>phptemplate_preprocess_block()</p>
  
  <p>phptemplate_preprocess_node()</p>
  
  <pre><code> function phptemplate_preprocess_page(&amp;$vars)
  
  {
      //code block from the Drupal handbook
  
      //the path module is required and must be activated
      if(module_exists('path'))
      {
          //gets the "clean" URL of the current page
          $alias = drupal_get_path_alias($_GET['q']);
  
          $suggestions = array();
          $template_filename = 'page';
          foreach(explode('/', $alias) as $path_part)
          {
              $template_filename = $template_filename.'-'.$path_part;
              $suggestions[] = $template_filename;
          }
  
          $vars['template_files'] = $suggestions;
      }
  }
  
  function phptemplate_preprocess_node(&amp;$vars)
  {
      //default template suggestions for all nodes
      $vars['template_files'] = array();
      $vars['template_files'][] = 'node';
  
      //individual node being displayed
      if($vars['page'])
      {    
          $vars['template_files'][] = 'node-page';
          $vars['template_files'][] = 'node-'.$vars['node']-&gt;type.'-page';
          $vars['template_files'][] = 'node-'.$vars['node']-&gt;nid.'-page';
      }
      //multiple nodes being displayed on one page in either teaser
      //or full view
      else
      {
          //template suggestions for nodes in general
          $vars['template_files'][] = 'node-'.$vars['node']-&gt;type;
          $vars['template_files'][] = 'node-'.$vars['node']-&gt;nid;
  
          //template suggestions for nodes in teaser view
          //more granular control
          if($vars['teaser'])
          {
              $vars['template_files'][] = 'node-'.$vars['node']-&gt;type.'-teaser';    
              $vars['template_files'][] = 'node-'.$vars['node']-&gt;nid.'-teaser';
          }
      }
  }
  
  function phptemplate_preprocess_block(&amp;$vars)
  {
      //the "cleaned-up" block title to be used for suggestion file name
      $subject = str_replace(" ", "-", strtolower($vars['block']-&gt;subject));
  
      $vars['template_files'] = array('block', 'block-'.$vars['block']-&gt;delta, 'block-'.$subject);    
  }
  </code></pre>