Drupal 6

How to add Drupal data to Javascript using drupal_add_js

There are times when one will need to pass Drupal data in Javascript or JQuery. One example that comes to mind is for analytics purposes, say after a user clicks on a specific link, you’d want to find the node type of the page the user made this click. In your .tpl.php, template.php file or [...]

Share