Return to Snippet

Revision: 40268
at January 28, 2011 10:03 by JohnnyGamba


Initial Code
# 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";

Initial URL

                                

Initial Description

                                

Initial Title
Get any Drupal data in javascript

Initial Tags
drupal

Initial Language
PHP