Acquia Cohesion renames to Site Studio from version 6.2. Tell me more.

    Importing a list of packages on module install

    Module developers can export packages and include as part of their module. When set-up correctly, the packages will automatically import when the module is enabled.

    To set this up, create a new Yaml reference file inside your module:


    This file should contain an array following the specific format. Each package in array needs to have "type" and "source" and can optionally have "options":

    • type - required property that decides how metadata in source property will be handled. For the default implementation of package handling where package files located in a module subdirectory `config/site_studio/<package>`, use default_module_package.
    • source - required property, that provides metadata required to import the package. For example, if type is set to default_module_package, then source needs to contain properties module_name (which refers to machine name of the module that contains the package files) and path (which refers to path from the module directory to the package files directory)
    • options - optional property, which allows for extra settings to be passed. Currently only extra-validation option is supported. If options property is omitted, extra-validation is set to false by default.

    Here's an example of site_studio.packages.yml containing two packages, both using default_module_package type:

      type: default_module_package
        module_name: test_module
        path: /config/site_studio/blog_feature_package
        extra-validation: false
      type: default_module_package
        module_name: test_module
        path: /config/site_studio/coh_component_hero_shallow
        extra-validation: true
    DX8 knowledge base icon

    Frequently asked questions

    Get instant answers to common questions. Available online 24/7.

    Find answers

    Raise a ticket icon

    Raise a support ticket

    To raise a ticket, sign into Acquia Cloud and select Help in the top menu.

    Raise support ticket


    Copyright © 2020 Acquia, Inc. All Rights Reserved. Drupal is a registered trademark of Dries Buytaert.