You are here

layout_builder_ids.module in Layout builder ids 2.0.x

Same filename and directory in other branches
  1. 8 layout_builder_ids.module

Functions for layout_builder_ids.

File

layout_builder_ids.module
View source
<?php

/**
 * @file
 * Functions for layout_builder_ids.
 */

/**
 * Implements template_preprocess_layout.
 */
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']) && $variables['content']['#settings']['layout_builder_id'] !== '') {

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

Functions

Namesort descending Description
layout_builder_ids_preprocess_layout Implements template_preprocess_layout.