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
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();
-
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
-