layout_builder_ids.module in Layout builder ids 2.0.x
Same filename and directory in other branches
Functions for layout_builder_ids.
File
layout_builder_ids.moduleView 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
Name | Description |
---|---|
layout_builder_ids_preprocess_layout | Implements template_preprocess_layout. |