I have looked but it seems I can't find the right answer or I don't have the skills for that. The thing is I'm getting this error:
Notice: Undefined variable: node in include() (line 69 of /home/xwebmedia/public_html/ltr/sites/all/themes/ltr/page.tpl.php).
and the code I'm using is:
<?php
if (count($node->field_adds) != 0)
{
foreach($node->field_adds['und'] as $key => $value)
{
$nid = $value['nid'];
$mywidget = node_view(node_load($nid));
print drupal_render($mywidget);
}
}
?>
Thing is everything is working fine, I get my widgets with adds in sidebar, but I am having this notice of error.
I know that I need to define a variable in template.php but I tried something it didn't work.
Any suggestions?