I am trying to add a CSS file to a specific internal basic page in Drupal 7 with no success.
After enabling the clean URL paths and add a path for my internal basic page I am able to capture the path using $path=drupal_get_path_alias();
.
After that, I am trying to put condition statements so when a specific path is loaded a specific CSS file is loaded. I have this piece of code in ninesixty_preprocess_page(&$vars, $hook)
in the template.php file.
if($path == 'about/advantages') {
drupal_add_css(drupal_get_path('theme', 'ninesixty') . "/page-about.css");
}
I have tested the IF-statement by echoing the $path
variable with total success. The page-about.css file does not load at all, though.
Please note that I am using Drupal with WAMP server, and the page-about.css file is located under drupal/sites/all/themes/ninesixty/styles/framework.