Jump to Navigation

014 - Drupal Custom CSS & JavaScript

We can append a custom CSS and JavaScript to your own module. We  instruct the theme system to include the module's CSS and JavaScript files along with the other stylesheets and JavaScript libraries Durpal will list in the HTML it sends to the clients.


$module_path = drupal_get_path('module', 'sample_module');
$full_path = $module_path . '/sample_module.css';
drupal_add_js($module_path . '/sample_module.js');



Main menu 2

Story | by Dr. Radut