HTML

Correct Way in Adding JS/CSS to a Block in Drupal 7

In Drupal, drupal_add_js() and drupal_add_css() are great functions for adding JS/CSS to the module or theme layer. However, if you do this inside of the ‘#markup’ call in Drupal 7, you are doing it wrong. This becomes obvious when you turn block caching or anonymous page caching on, because the JS/CSS won’t be included on the page. ... Read More