
If a module provides too many additional. Having these files immediately visible makes it more obvious that this module provides theme functions (and makes them easy for front-end developers to find), has a settings page, and provides user-facing pages. Javascript files are always kept in a js folder, CSS in a css folder, templates in a templates folder, and tests in a tests folder.īackdrop recommends the following files be kept in the root of the module folder. There are now recommended locations for common module files. Read more in next section.ĭescription = Import and export menu hierarchy using indented, JSON-like text files.Ĭonfigure = admin/structure/menu/import Organization of Module Files file and not listed in hook_autoload_info(). To have this class loaded you'll need to implement hook_autoload_info() in your module file instead. This means that you'll need to remove any lines in your info file that define files containing PHP classes: files = whatever.inc. In Backdrop the class registry has also been removed and replaced with a static class map ( see the related change record).

For modules that would like to support both Drupal 7 and Backdrop at the same time, the old Drupal core version can also remain, but for Backdrop-only modules this line should be removed: core = 7.xīackdrop also distinguishes between different types of projects (modules, themes, layouts) by using the line type = module and the packaging script on will fail if the type line is excluded. The first and most important change is that a new Backdrop-specific core version needs to be added: ' backdrop = 1.x'. Here is a comparison of Drupal and Backdrop module info files:ĭescription = Allows users to create and organize related content in an outline. If you have extended documentation, you should include that in a Wiki page in your project's GitHub repository once it has been moved into the backdrop-ops/contrib project group. Backdrop README files are short summary documents. Note that Drupal README files often contain detailed documentation. There is considerable variation in what gets put into a Drupal README file, but Backdrop has a recommended structure: you can use this sample README.md file for the overall structure. Backdrop modules have a README.md file, so you should convert the Drupal README to Markdown format. Most Drupal modules have a README.txt file.
Drupal 7 modules download#
You can also download a sample module template to use for reference. For reference, see the developer documentation for Backdrop modules. The organization of files within the module directory is similar to that of Drupal, but there are some differences. Note, however, if you are not yet a member of the backdrop contrib group you cannot push into the :backdrop-contrib repository. You can now see all of releases that are on the Drupal project page (e.g., /releases) in your repository. Git remote add origin Push to the new repository. # Remove the old origin and point at Github instead.


This would be for a module that had a 2.x release: This can be done on the command line as follows. The process typically starts by creating a new repository on GitHub for the Backdrop version from the Drupal 7 module codebase.
Drupal 7 modules upgrade#
You should still, however, read through all of the below even if using Coder Upgrade, because there will likely need to be some "touch-up" changes to the code after Coder Upgrade does its conversion. The Coder Upgrade module can carry out many of the required changes automatically.

(If your module is not Drupal version 7, we recommend you follow Drupal's module conversion guidelines to upgrade (or downgrade) to Drupal 7 before continuing.)Ī useful video by demonstrates most of the main issues in this document.īefore you start porting a module, please create the two recommended issues stated on the Communicating section of the Converting Drupal code page. This guide suggests a process for converting Drupal 7 modules to Backdrop, and the common issues which might arise during the conversion. However, Backdrop still has significant advantages over Drupal 7, and it would make sense to fully port your module rather than depend on the compatibility layer. To make things even easier, Backdrop includes a Drupal compatibility layer which should enable Drupal functions (even those with the format ' drupal_XXX', such as drupal_set_message), to just work, for now. Backdrop's codebase is similar to Drupal 7 and generally needs very few changes to convert.
