Thursday, January 13, 2011

Five New Features of Drupal 7 .info file

1. Drupal 7 now supports a dynamic-loading code registry.To support it, all modules must now declare any code files containing class or interface declarations in the .info file


files[] = example.test

2. As of version Drupal 7.x, the path of the module's (main) configuration page can be given in .info file. This will be the path of the "Configure" link for this particular module on the modules overview page.


configure = admin/config/example

3. As of version Drupal 7.x, modules and themes may specify that they should not be visible on the modules page by adding hidden = TRUE.


4. As of version Drupal 7.x, modules and themes may specify that they are absolutely required and should never be disabled by adding required = TRUE. These modules will be enabled automatically during install. In most cases it should only be used with the Drupal core required modules (e.g. Node, User, etc.).


5. Stylesheets can be included in drupal 7 .info in below format:

stylesheets[all][] = sample.css

No comments: