Created
July 17, 2013 15:10
-
-
Save killua99/6021464 to your computer and use it in GitHub Desktop.
add css and js in preprocess page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Preprocess page. | |
*/ | |
function mytheme_preprocess_page(&$vars) { | |
drupal_add_css(path_to_theme() . '/css/foo.css', 'theme', 'all'); | |
$vars['styles'] = drupal_get_css(); | |
drupal_add_js(path_to_theme() . '/js/foo.js'); | |
$vars['scripts'] = drupal_get_js(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment