When I enable the Node Displays module, the node-type.tpl.php templates stop rendering in the right way.
Looking at the code, I see that the module is adding nd templates and node.tpl.php even when I'm not using the ND for this content type, so my node is rendered with node.tpl.php instead of node.tpl.php.
// Add nd-content_type-build_mode(-nid) template suggestion.
$vars['template_files'][] = 'nd';
$vars['template_files'][] = 'nd-'. $node->type;
$vars['template_files'][] = 'nd-'. $node->type .'-'. $node->build_mode;
$vars['template_files'][] = 'nd-'. $node->type .'-'. $node->build_mode .'-'. $node->nid;
// Break all the rendering if needed.
if (!$node->render_by_ds) {
$vars['template_files'][] = 'node';
return;
}
This seems to be a bug in the module, am I missing something?
Comments
Comment #1
superstar commentedYes, I have the same issue. When nd is enabled, the tpl files no longer effect the node display even those node types are excluded from nd.
This means that its nd or the standard template system (all or nothing).
Comment #2
swentel commentedYep, my fault completely apparently in the logic. Patch attached fixes the logic - can you verify to see if it works ?
Comment #4
swentel commentedWeird error from simpletest, local tests are working fine - marking as to be ported after some more extensive testing on local sites too.
Comment #5
swentel commented