template_preprocess_html() in template.php file. Preprocess variables for html.tpl.php
function themename_preprocess_html(&$variables) {
// Add external file
drupal_add_css('https://fonts.googleapis.com/css?family=Roboto:400,300,500,700',array('type' => 'external'));
// Add Javascript file at the bottom of a page
drupal_add_js('/sites/all/themes/purple/js/bootstrap.min.js', array('type' => 'file', 'scope' => 'footer', 'weight' => 10));
}
- 63 views
Add new comment