0

Is there a tool that automates (or helps) the creation of a module based on a current custom content type ? I have two new content types (forms) created using the Drupal user interface, now I realize I need to customize it further and would like to create a module to pack them all. Since I already done a lot of work building the (big) forms I was wandering if there is some kind of trick (or module) to accomplish this.

5

Use Features. It's main job is to export such configuration into code. While not primarily intended to be manipulated afterwards, it's definitely possible, as I've done so several times myself.

You can even add custom directly into the generated .module file and features will respect and keep that if you do further changes from the UI later.

This way you can keep using the UI to make most of the changes to the content type, yet keep custom logic in the same module.

2

Take a look at the Features module. It allows you to export content types as features which can then be installed similar to modules.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.