Closed (fixed)
Project:
Node breadcrumb
Version:
6.x-1.0-beta4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Sep 2009 at 15:10 UTC
Updated:
24 Sep 2009 at 22:00 UTC
I'm having a problem where enabling node_breadcrumb causes template selection to fail. My story nodes should be using the page-story.php.tpl template, but when node_breadcrumb is enabled, the story nodes are displayed with page.php.tpl. Any ideas why this would be happening?
I'm wondering if the following snippet in my template.php is being overridden:
function phptemplate_preprocess_page(&$vars) {
// Add additional template suggestions
if ($vars['is_front'] != 1) {
$vars['template_files'][] = 'page-' . $vars['node']->type;
}
}
It seems that $vars['node']->type is empty when node_breadcrumb is enabled.
Comments
Comment #1
edhel commented$vars['node'] is empty as since "menu system" believe that current menu item was changed.
You can fix this problem by change your template.php. Add this line before your code:
Comment #2
talesa commentedThank you, that fixed it.