Get any Drupal data in javascript
Copy this code and paste it in your HTML
# In any hook_init().
drupal_add_js
(array( 'citris' => array( 'basePath' => base_path
(), ), ), 'setting');
#In any js inside Drupal
uri = Drupal.settings.citris.basePath + "mypath";
Report this snippet
Comments
Subscribe to comments