Last active
October 15, 2019 09:53
-
-
Save radheymkumar/46f31f40f823e05afdbcbe0746270da7 to your computer and use it in GitHub Desktop.
View page add js
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
/** | |
* Implements hook_views_pre_render(). | |
*/ | |
function custom_views_pre_render(ViewExecutable $view) { | |
if (isset($view) && ($view->storage->id() == 'super_awesome_view')) { | |
$view->element['#attached']['library'][] = 'custom/custom_view'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment