I am trying to get a preprocess function to work on my drupal 7 site and am having some difficulty. I was given this.
function fource_preprocess_page(&$vars) {
if ($vars['is_home']) {
$path = drupal_get_path('themes', 'fource');
drupal_add_js($path . 'js/image_scale.js');
$vars['scripts'] = drupal_get_js();
}
}
-fource is the name of my theme -I am using the page--home.tpl file as I am using panels for the homepage ? Not sure about the path... ('themes', 'fource') ? Also need to add the css file.
I have no idea what I'm doing here so the most detailed explanation would be greatly appreciated.