title: Notice: Undefined variable: node in include() Drupal 7
body: <p>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:</p>
  
  <pre><code>Notice: Undefined variable: node in include() (line 69 of /home/xwebmedia/public_html/ltr/sites/all/themes/ltr/page.tpl.php).
  </code></pre>
  
  <p>and the code I'm using is:</p>
  
  <pre><code>&lt;?php
  if (count($node-&gt;field_adds) != 0)
  {
      foreach($node-&gt;field_adds['und'] as $key =&gt; $value)
      {               
          $nid = $value['nid']; 
          $mywidget = node_view(node_load($nid));
          print drupal_render($mywidget);
      }       
  }
  ?&gt;
  </code></pre>
  
  <p>Thing is everything is working fine, I get my widgets with adds in sidebar, but I am having this notice of error.</p>
  
  <p>I know that I need to define a variable in <code>template.php</code> but I tried something it didn't work.</p>
  
  <p>Any suggestions?</p>