What You Should Know About Drupal File Management

Lessons learned.

What You Should Know About Drupal File Management

June 01, 2009 - James Andres

You should know...

How to manage javascript

  • tip: jQuery plugins can be downloaded to sites/all/js for easier management
  • tip: Custom plugins should be either attached to a custom module or custom theme. The choice is based on whether the plugin helps a module, or purely acts at the design layer.
    • eg: A plugin that adds DHTML UI elements for a block should live in the module that creates the block.
    • eg: A plugin that adds DHTML navigation for the site would reside in the theme

How to manage modules

  • tip: Use logical separations for development, contrib, and custom modules. For example:
    sites/all/modules/contrib # Modules checked out from Drupal.org CVS
    sites/all/modules/custom # Custom created modules
    sites/all/modules/development # Development ONLY modules

How to manage CSS

How to manage images

  • tip: Images are nearly ALWAYS part of a custom theme. Hence they should live inside the custom theme (eg: sites/all/themes/my_theme/images). Images should NEVER be put inside the/images directory in the root of the site, this folder is part of Drupal core.