Is it possible to add folders in config/install?

by Mike Nolan   Last Updated May 13, 2018 05:07 AM

I am working on a Drupal 8 module that has a fairly large number of configs (a few content types and fields, with 20-25 config files per content type), and one thought I had for organization was to put the configs for each CT into a subfolder under config/install. However, I see that the configs are not read in this case.

Which is the better way to proceed?

1) Just place everything in config/install, with 100-150 config files.

2) Create sub-modules for each content type, which would require a bit more overhead but could be done given the module's use case.

3) Is there a way to add subdirectories in config/install?

For some background, I wrote a Python daemon that does server monitoring, and the module handles communication between the monitors and a central reporting server. Each content type corresponds to a plugin for the monitor, so someone could turn on only the plugins that they want. However, in the current iteration I would prefer to have a core set of content types that are managed by one module.



Related Questions


Using Configuration API in drupal 8

Updated June 15, 2015 23:03 PM




Config folder in drupal8

Updated April 13, 2016 08:03 AM