-1

The template file html.tpl.php has access to the $scripts variable, which is not initialized in template_preprocess_html(). I have also looked at template_preprocess(), and template_process(), but neither of those functions initialize $scripts.

1 Answer 1

2

The $scripts variable is initialized in template_process_html(), which uses the following code.

$variables['css'] = drupal_add_css();
$variables['styles'] = drupal_get_css();
$variables['scripts'] = drupal_get_js();
2
  • They forgot to add a link to that function, in the documentation for html.tpl.php. Thank you.
    – apaderno
    May 6, 2011 at 5:21
  • feel free to post a patch :p May 6, 2011 at 5:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.