-
Book Overview & Buying
-
Table Of Contents
Drupal 7 First Look
A .info file is required by all modules in Drupal. The .info file gives Drupal information about your module. The .info file for modules is very similar to the .info files we looked at for installation profiles and themes. The big change to .info files is that you must now declare any associated PHP files that you plan on using from your module. Let's look at an example of a .info file for a fictional Drupal 7 Rocks module.
; $Id$ name = Drupal 7 Rocks description = "Promotes the coolness of Drupal 7." core = 7.x package = Views dependencies[] = Other dependencies[] = panels files[] = drupal_7_rocks.module files[] = drupal_7_rocks.inc files[] = drupal_7_rocks.admin.inc files[] = includes/drupal_7_rocks.extra.inc
The structure of the file is the same as it was in Drupal 6; other than that the files array has been added and is now required. The files directive allows Drupal to dynamically load code from files more efficiently. It also allows you to place code that implements...
Change the font size
Change margin width
Change background colour