Configuring Drupal modules from another module

When I create a new Drupal site, I usually end up with at least one custom module and a few modules added by the community. For the site to work properly, you need to set many configuration parameters for various modules. This makes deploying a new Drupal example painstaking and error prone.

I would like to give my custom module the ability to configure all other modules. Either during installation, or when you click a button on my module administration page, all the necessary configuration values ​​on other modules will be installed programmatically.

How am I best to do this?

+3
source share
5 answers

AFAIK, there is no way to achieve what you mean easily. I try to use as much hook_update_N () as possible and often do database synchronization as described in my answer to this question . However, this will not work if you already have a live server with which you will have to combine data.

To this end, I use various tools according to my needs. No one is perfect, but here, however, is a small collection of my favorites:

  • Features. . : // . , . , , , , : CCK, Views, ImageCache ... (~ 10 ) .

  • . : . , .

  • Node export. ( ) drupal . , , , .

  • Deploy. - node ( ). , , , , , / SOAP.

  • / . , . (XML CSV).

  • ( ctford) . , .. . , , Drush, . , , . , , , Drush, , .

, / .

!

+5

"features"? , , . :

" Drupal. Drupal, .

API . Drupal, , (, , , CCK ..) .info , , . "

http://drupal.org/project/features

+3

. , .. . , Drush, .

, , . , , , Drush, , .

+3

, , , .

, , , , ...

, , , , , , " " -configuration module ' - , , , .

, Drupal:)

+2

Since initialization is only required when installing Drupal, I would have thought that the installation profile is a more efficient solution; to save a module that is no longer in use as soon as the configuration is configured seems a bit overwhelming, IMO.

0
source

Source: https://habr.com/ru/post/1725069/


All Articles