Last active
August 29, 2015 14:06
-
-
Save davestacey/3a9adde22a4f2e4defbc to your computer and use it in GitHub Desktop.
Drupal Module - add js
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
<?php | |
function ds_maps_preprocess_page(&$variables) { | |
//dpm("ds_maps_preprocess_page"); | |
if (isset($variables['node']) && $variables['node']->type == 'map_geojson') { | |
//dpm("map_geojson"); | |
// Add js | |
drupal_add_js(drupal_get_path('module', 'ds_maps') . '/ds_maps.js'); | |
$variables['scripts'] = drupal_get_js(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment