Created
January 25, 2012 11:51
-
-
Save sivaji/1675931 to your computer and use it in GitHub Desktop.
Adding css in view page
This file contains 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
/** | |
* Implements hook_views_pre_render(). | |
*/ | |
function example_views_pre_render(&$view) { | |
$deals_view = array('deals', 'previous_deals'); | |
if (in_array($view->name, $deals_view)) { | |
drupal_add_js(drupal_get_path('module', 'td_deals') . '/td_deals.js'); | |
$contextual_module_path = drupal_get_path('module', 'contextual'); | |
drupal_add_js($contextual_module_path . '/contextual.js'); | |
drupal_add_css($contextual_module_path . '/contextual.css'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment