Alex Rivera | Logout

Include CSS or Javascript file for specific node in Drupal 6

Asked 2008-09-14T23:54:58.403
23

What is the best method for including a CSS or Javascript file for a specific node in Drupal 6.

I want to create a page on my site that has a little javascript application running, so the CSS and javascript is specific to that page and would not want to be included in other page loads at all.

Edit
Report

1 Answer

3

The best solution I've come up with so far is to enable the PHP input mode, and then call drupal_add_css and drupal_add_js as appropriate in a PHP block in the start of the body of your node.

answered 2008-09-15T00:00:15.100

Your Answer