Created
November 13, 2012 04:11
-
-
Save joedougherty/4063888 to your computer and use it in GitHub Desktop.
Example template.php to add js just to front 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 | |
// Be sure to replace THEME_NAME with the name of the current theme | |
function THEME_NAME_preprocess_html(&$variables) { | |
if ( drupal_is_front_page() ) { | |
drupal_add_js( 'path/to/file' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment