Created
November 13, 2013 21:46
-
-
Save ewillhite/7456993 to your computer and use it in GitHub Desktop.
Views Pre-render to add files
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 | |
// Views Pre-Render Function | |
function YOUR_THEME_views_pre_render(&$view) { | |
if($view->name == 'VIEW_MACHINE_NAME') { | |
if ($view->current_display == 'VIEW_DISPLAY_MACHINE_NAME') { | |
drupal_add_js(drupal_get_path('theme', 'YOUR_THEME') .'/js/SPECIFIC_VIEW.js'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment