Information for: DEVELOPERS   PARTNERS

Extending Lightning


The information on this page applies only to Lightning version 8.x-2.04 or any previous versions.

If you are using Lightning version 8.x-2.05 or greater, you must convert any previously created extend files to Lightning subprofiles.

Business requirements dictate the need to provide a specific, unique out-of-the-box experience. With Drupal, this need is often filled by profiles. Distributions such as Lightning include their own profiles, which usually preclude the use of other, personalized profiles.

However, Lightning provides a way for website builders to extend the out-of-the-box experience by using configuration information contained in the lightning.extend.yml file. This extension capability enables website builders to change the theme, define new content types or other entity bundles, and enable Feature modules by enabling builders to override, delete, and add to the default Lightning configuration.

lightning.extend.yml is provided in the codebase:

# Defines additional tasks for Lightning to perform during and after site
# installation.

# List of additional modules to enable after Lightning is installed.
modules: { }

# A system path to redirect to once installation is complete.
path: ''
# Optional query string parameters.
query: { }

lightning.extend.yml enables website builders to define:

  • A list of additional modules to enable after Lightning has finished installation.
  • A path that users should be redirected to after installation of Lightning and the additional modules is complete.

If you need to customize your Lightning build, you can download the Acme Lightning Extend example. This example will:

  • Enable the Acme Custom module, which sets a new theme, and deletes the default content types that come with Lightning.
  • Enable the Features module and activate the following Features:
    • Lightning Settings: Disables automatic creation of roles in Lightning.
    • Product: Creates a Product content type and associated taxonomy.
    • Theme Settings: Defines some settings for the Acme theme.
  • Redirect the user to a custom messaging page.