You are here

function layout_builder_ids_preprocess_layout in Layout builder ids 8

Same name and namespace in other branches
  1. 2.0.x layout_builder_ids.module \layout_builder_ids_preprocess_layout()

Implements template_preprocess_layout

File

./layout_builder_ids.module, line 6

Code

function layout_builder_ids_preprocess_layout(&$variables) {

  // If there is a layout builder id, set it in the attributes.
  if (isset($variables['content']['#settings']['layout_builder_id'])) {

    // Set the id attribute.
    $variables['attributes']['id'] = $variables['content']['#settings']['layout_builder_id'];
  }
}