Information for: DEVELOPERS   PARTNERS

Layouts in Acquia Lightning

Acquia Lightning allows website builders to define default layouts for content types or define several layouts, while editors can choose which layout to use for each post.

Acquia Lightning includes a Landing Page content type which allows editors to create and place discrete blocks of content in any order and layout using an intuitive, accessible interface.

Layout defaults in Acquia Lightning

Layout defaults are existing page layouts you can use as long as no layout overrides also exist. Layout overrides apply to all nodes and entities of a given content type or bundle. Overrides allow you to override the Layout default and create a custom layout for an entity.

For more information about Layout overrides, see Creating Layout overrides on Drupal.org.

The level of specificity for a default layout depends on the content it’s applied to:

  • Entity types such as Content types and Vocabularies contain sub-types or bundles. Bundle examples include Articles or Blog posts for Content types and Tags or Categories for Vocabularies.

  • Entity types such as Users don’t have sub-types. Unless overridden, layouts will apply across the board.

  • You can apply Layout defaults on a per-view-mode basis. A view mode specifies a different context in which you can display content. Search results and Teasers are examples of view modes.

    Different view modes can use different Layout defaults. For example, the Teaser view mode for a content type can use a different Layout default from its default view mode.

For more information about Layout defaults, see Creating Layout Defaults on Drupal.org.

Creating a Layout default

The following example demonstrates how to create a default layout for the Article content type:

  1. Sign in to your website as a user with Administrator or Site builder permissions.

  2. Go to Structure > Content types > Article > Display, and select Manage display.

  3. From Layout Options, select the check box for Use Layout Builder and then click Save.

    Enable Layout Builder

    The list of display fields is replaced with the Manage layout button.

    Field display versus Manage layout button

  4. Select Manage layout to create your layout in the Layout Builder user interface. For more information about Layout Builder, see Building Layouts Using the Layout Builder UI on Drupal.org.

  5. Your new layout will apply to all nodes of the Article content type, except for overwritten nodes, when displayed in the Default view mode.

    View modes such as Teaser will not use Layout Builder unless it’s specifically enabled on the view mode.

Note

You don’t have to use the default layout of an entity. You can override the default layout and use a custom entity-specific layout instead. For more information, see Creating Layout Overrides on Drupal.org.