Closed (fixed)
Project:
Basic
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
1 Oct 2012 at 09:46 UTC
Updated:
9 Mar 2013 at 19:45 UTC
Has anyone succeeded to override page.tpl.php with page-type.tpl.php?
I tryed to add this code to template.php:
function basic_preprocess_page(&$variables, $hook) {
// Page template suggestions based off of content types
if (isset($variables['node'])) {
$variables['theme_hook_suggestions'][] = 'page__type__'. $variables['node']->type;
$variables['theme_hook_suggestions'][] = "page__node__" . $variables['node']->nid;
}
}
And also tryed to add if-part only to function basic_preprocess_page(&$vars, $hook) { -which is already in template.php.
I have content type (machine name) cars and added page--cars.tpl.php
But no luck. Also tryed to flush caches.
Comments
Comment #1
SteveK commentedThanks. added this to 3.x branch.