It is my understanding that 'out of the box' Drupal does NOT use a template suggestion for page templates based on content type.  Page templates are overridden by default for the front page or specific nodes only.  Node templates CAN be used per content type by default (node template are not what you're asking about.)  Plenty of information on http://drupal.org/node/190815 (as already mentioned in this thread.)


To use a page template per content type, I believe you will need to use a custom function in template.php.  The one provided by Aldo seems like it should work.   It could be that you need to clear the theme cache (http://drupal.org/node/173880#theme-registry). 

Or maybe the function is not being processed.  You could simply rename the function (.._preprocess_...) and that may help.  Or, rename $vars with $variables.  Take a look at these two pages. 

http://drupal.org/node/223430
http://drupal.org/node/223440


Sorry I can't be more help with the exact naming to use.

- John
**************************************************
John Callahan
Geospatial Application Developer
Delaware Geological Survey, University of Delaware
227 Academy St, Newark DE 19716-7501
Tel: (302) 831-3584  
Email: john.callahan@udel.edu
http://www.dgs.udel.edu
**************************************************


Scott Matthews wrote:
Re: [support] Overriding page.tpl.php for node type... Is there nothing more that you did for this?  I just plugged this in replacing the version of that method I had before and it did not work.  It’s still not recognizing my page-type.tpl.php.

Did you mean to name the file template.tpl.php, or did you mean template.php?


On 4/10/09 9:55 AM, "Aldo Martinez Selleras" <aldo@caonao.cu> wrote:

this work for me, in template.tpl.php

function _phptemplate_variables($hook, $vars) {
if ($hook == 'page') {
    if ($vars['node'] && arg(2) != 'edit') {
        $vars['template_files'][] = 'page-'. $vars['node']->type;
    }
    return $vars;
}

them , i create some files!

page-blog.tpl.php
page-forum.tpl.php
page-privatemsg.tpl.php
page-my_node.tpl.php


--
----------------------
Aldo Martinez Selleras
Especialista en Telematica
CITMATEL GND Camaguey
Tel: 53 32 291661
Linux User #364356
--
[ Drupal support list | http://lists.drupal.org/ ]


-- [ Drupal support list | http://lists.drupal.org/ ]