Extending Lightning

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.
redirect:
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 Lightning's automatic creation of roles.
    • 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.

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Contact supportStill need assistance? Contact Acquia Support