SHARE
TWEET

Untitled

a guest Jun 18th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function THEME_preprocess_page(&$variables) {
  2.  
  3.    if (isset($variables['node']->type)) {
  4.    $variables['theme_hook_suggestions'][] = 'page__' .
  5.    $variables['node']->type;
  6.   }
  7.  
  8.   //this is what I am trying
  9.    if ($variables['nid'] == '77') {
  10.     drupal_add_js(drupal_get_path('theme', 'THEME') .'/scripts/path.js');
  11.    }
  12.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top