Add CSS and JS to a node

Public

This is in mymodule.module. You'll need a matching mymodule.info file formatted according to the docs

Get raw version
php
  1. <?php
  2. /**
  3.  * Implements hook_node_view
  4.  */
  5. function mymodule_node_view($node, $view_mode, $langcode) {
  6. if ($node->id == 123 && $view_mode = 'full') { // your node id here and whatever the view mode is your targeting
  7. drupal_add_css(...);
  8. drupal_add_js(...);
  9. }
  10. }