Configuration management is one of the most prominent features of Drupal 8. You can easily import and export configurations using YAML files and also store them in the “config” table of the database.
Given this, it has become a cakewalk now to pass commands in Drush and follow the steps required to export configurations from one environment and import it to another, thereby making it easier to manage them in code-base using the version-control system.
However, things turn out complicated when it comes to managing multiple site configurations that employ a “single” platform for streamlining common features across various brands.
For instance, there is information in the article that all brands want to use on their respective sites. The twist is that each brand wants to use different sets of fields and display pattern to showcase it on their site.
Thus, the problem of this solution is to create one profile, “Core Platform” and place all common features for easy distribution and sharing across multiple brands. Further, these features should be pluggable as well available for each brand to use in the future.
This blog series (Part I & II) will help you understand the development process and maintenance of -
Please note that if configuration management is a new business for you, it’s highly recommended to go through the Drupal documentation first to acquaint yourself with configuration export and import commands.
Moving forward, let’s consider two cases to determine whether a feature should be brand specific or need to be pushed as part of a Core platform to become available for multiple brands.
Case 1 :
Multiple brands have requested to introduce a new content type, “companies on the move” section, which lets anonymous users submit their entries in the same and complete the process by going through a checkout process. This will display users’ submitted profile on /company-on-the-move listing page.
So, these are the following questions that crop up, considering the case I:
Now, if answers to the above questions involve “brand A, B, C, D, and Nothing”, i.e., nothing specific needs to be developed and displayed for any brand, then it is an indication for core platform features.
Besides, these features in the core can be employed by any brand, anytime in the future.
Case 2 :
Brand A and B want to add a specific new field for their editors to company content type, which would be accessible for them only. In this case, we’ll have the following info available across all brands:
It is obvious that only Brand A & B require this feature, so it will be known as “Brand Specific”.
It can be achieved through the following steps-
Since our objective is to manage configurations across multiple brands, we’ll take forward the 2nd approach from here onwards.
Learn more about building a Drupal multisite from here-
With a clear understanding of the features’ availability and unavailability for multiple brands, developers can find it easy to jump onto the implementation part.
Case 1 :
Case 2:
Thus, you can decide and develop Core/ brand-specific features hassle-free by following the above-mentioned steps.
And to learn more about the development process and implementation methods, stay tuned for the next part of the blog, “Configuration Management in Action”.
Keep Coding!