[support] fusion/acquia marina: how to override the page.tpl.php with costum page-contenttype.tpl.php

Liviu Nicolicioiu liviu.nicolicioiu at epoint.ro
Mon Aug 9 05:26:34 UTC 2010


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 at 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/ ]
>



-- 
regards, mit freundlichen Grüßen, cu stima,
Liviu Nicolicioiu

Chief Technichal Officer
______________________________

epoint - consulting + development

Vacarescu 7 300182 Timisoara Romania

email: liviu.nicolicioiu at epoint.ro
skype: nicolicioiu.liviu
mobile: +40 / 745/ 560 322
fax: +40 / 256 / 407 147
www.epoint.ro

"reliable solutions. delivered."
______________________________
This message and any attached files are confidential and intended solely for
the addressee(s). Any publication, transmission or other use of the
information by a person or entity other than the intended addressee is
prohibited. If you receive this in error please contact the sender and
delete the material. The sender does not accept liability for any errors or
omissions as a result of the transmission.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20100809/ed84332d/attachment.html 


More information about the support mailing list