I'm trying to add a css to a view, through the preprocess view as below
function mytheme_preprocess_views_view(&$vars) {
$view = &$vars['view'];
if ($view->name == 'gallery_view') {
drupal_add_js(drupal_get_path('theme', 'mytheme') . '/assets/js/responsive-image-gallery/gallery.js');
drupal_add_css(drupal_get_path('theme', 'mytheme') .'/assets/css/responsive-image-gallery/style.css');
}
}
The Following code above is inserting the js file but not the css. Is there a reason why? Or other way to insert css file in certain view?
I have tried the following and its being inserted:
drupal_add_js(drupal_get_path('theme', 'zenon') .'/assets/css/responsive-image-gallery/style.css');
So is there something missing in the drupal_add_css function or it doesnt have read access on the server, is that possible?