title: Adding script to certain nodes and pages on drupal 7
body: <p>I am trying to add a script code on all pages of my drupal except a few. Is there any conditionals I can use in html.tpl.php ?  or any functions on the template.php to achieve this?</p>
  
  <p>I tried the code below on template.php but no luck :(</p>
  
  <p>Thanks in advance! </p>
  
  <pre><code> function THEME_preprocess_page(&amp;$variables) {
  
    if (isset($variables['node']-&gt;type)) {
     $variables['theme_hook_suggestions'][] = 'page__' . 
     $variables['node']-&gt;type;
    }
  
    //this is what I am trying
    if ($variables['nid'] == '77') {
     drupal_add_js(drupal_get_path('theme', 'THEME') .'/scripts/path.js');
    }
  } 
  </code></pre>