By fhelmschrott on
Hi all,
i'm using this code within page.tpl.php to show the sidebar-inner div only with a special node type:
http://drupal.pastebin.com/m14ffdc9f
unfortunately this throws an error which i can't get rid of
here's the error: http://drupal.pastebin.com/m772f72c
any idea? (code works though but the error appears).
The error sometimes appears after hitting F5 (refresh) in the browser but doesn't appear when calling a page for the first time. It appears on nodes and within a view full of nodes.
Thanks for helping!
Comments
What node are you trying to load
Shouldn't you be passing some value into node_load() ?
See http://api.drupal.org/api/function/node_load/6
HTH
Arie
Of course, Arie - thanks for
Of course, Arie - thanks for pointing to the right direction - works now with
<?php node_load(arg(1)); ?>Why ,..
Why are you explicitly loading the node object?
As the question suggests,
As the question suggests, $node is already set in page.tpl.php when viewing a single node.