Hi,
I'm trying to theme the pages that shows the node generated by content type called "project". I saved a copy of the file page.tpl.php as page-project.tpl.php, and my changes to it does not effect the theme.
I tried to do it in the theme, in the fusion themes... nothing works. the weird thing is that it works great with costum node.tpl.php and even with page-front.tpl.php !!
All my themes are in sites/all/themes
thanks a lot!
Lio
Hi,
In template.php from your theme, yourtheme_preprocess_page(&$vars) add this lines: //only on the view //change theme of page if(isset($vars['node']) && is_object($vars['node']) && $_GET['q']=='node/'.$vars['node']->nid){ $vars['template_files'][] = sprintf('page-%s', $vars['node']->type); }
Best Regards, Liviu.
On Mon, Aug 9, 2010 at 3:46 AM, Lior Chefetz liorchefetz@gmail.com wrote:
Hi,
I'm trying to theme the pages that shows the node generated by content type called "project". I saved a copy of the file page.tpl.php as page-project.tpl.php, and my changes to it does not effect the theme.
I tried to do it in the theme, in the fusion themes... nothing works. the weird thing is that it works great with costum node.tpl.php and even with page-front.tpl.php !!
All my themes are in sites/all/themes
thanks a lot!
Lio
-- [ Drupal support list | http://lists.drupal.org/ ]
Hi,
Am 09.08.10 05:46, schrieb Lior Chefetz:
I'm trying to theme the pages that shows the node generated by content type called "project". I saved a copy of the file page.tpl.php as page-project.tpl.php, and my changes to it does not effect the theme.
have a look here: http://gotdrupal.com/videos/unique-pages-by-content-type
Is a very helpfull video that explains a lot.
Bye, Matthias