[support] Overriding page.tpl.php for node type...

Jamie Holly hovercrafter at earthlink.net
Fri Apr 10 14:59:16 UTC 2009


After you put that in, you need to clear Drupal's cache so that it 
rebuilds the theme registry (D6+ only).

Jamie Holly
http://www.intoxination.net 
http://www.hollyit.net



Scott Matthews wrote:
> 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 at 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/ ]


More information about the support mailing list