Questions tagged [layout-builder]

Use it for questions about the Layout Builder module.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

Rendering the Layout Builder form in a controller

I'm trying to render a Node's Layout Builder Override form in a custom controller, but I'm having issues rendering the entity form. I basically want to have the Node's layout builder on it's own page. ...
0
votes
0answers
6 views

Adding a new field to the layout_builder_update_block/layout_builder_add_block for a view block for usage later

We are using layout builder for adding view blocks to node pages. I need to modify the "add/update" form with a new boolean field (checkbox), and use the results that are stored (true/false) later on ...
0
votes
0answers
26 views

How do I set the Layout builder modal to use the administrative theme?

I'm building a custom Drupal theme and wondering if there is a way to get the modal windows to use the default admin theme. I'm using the Layout builder module with a custom block that uses the Media ...
0
votes
1answer
8 views

View block filter by taxonomy term (field)

I am doing some block experiments because I'm new in Drupal and I want to know if I can create a view block to place X(more than one) times in the same page with different results by taxonomy term ...
0
votes
0answers
25 views

Layout builder - Can't use hook_block_access()

I'm using hook_block_access() so I can apply custom contextual access rules to blocks based on a Node field value of the page being viewed. This works fine unless I build the page using Layout Builder....
0
votes
0answers
21 views

Why are the Layout Discovery core layout templates overriding my custom layout templates?

I've defined this layout in a [mymodule].layouts.yml file; layout_twocol_section: label: 'Two column' path: layouts/twocol template: layout--twocol library: [mymodule]/twocol class: '\...
1
vote
0answers
34 views

Get readable content array keys when using Layout Discovery and layouts templates

I noticed when using Layout Discovery on nodes display modes, the content array looks like this. Compared to the content array without using Layout Discovery which looks like this : A counterpart of ...
1
vote
1answer
71 views

How to make rows of views blocks on a basic page via the Layout Builder, reacting collectively to an exposed filter?

I have to make a page, containing 3 rows with 3 blocks with content teasers. Preferably the page layout should be made through a basic page content type item, through the Layout Builder, so it is easy ...
0
votes
1answer
18 views

Can we display region label from Layouts?

We have a MYTHEME.layouts.yml file which defines regions... layout label: 'Layout Name' path: templates/panels template: layout-template default_region: theregion regions: theregion: ...
0
votes
0answers
21 views

How to add layout or panels to my custom page?

I'm creating custom layout to use for my custom page that has 4 horizontal regions. But i'm not sure how to fetch the layout in my custom page.i added below code in my mycustomtheme.layouts.yml ...
0
votes
1answer
33 views

How to override Core Layout Builder protected function?

I'm not sure the proper method for overriding a protected core function. It's pretty simple with a hook but a little lost here. The goal is to swap out the warning for an error message, works fine ...
2
votes
0answers
110 views

How do I achieve layout nesting?

We have a content type (Page) and a vocabulary (Sections). The content type has a reference field to the vocabulary, and the vocabulary has a reference to a menu. Also, we are interested in being able ...
3
votes
0answers
114 views

How do we programmatically place a section and then a block in that region on module install?

We are looking for the best way to export a defined/built layout with inline blocks and then use that to programmatically set both them during a module install. eg. module install create node in ...
0
votes
2answers
126 views

“Edit layout” form missing revision log message field

When I edit the layout for a given node it is missing a log message field in the revision area. Is anybody else seeing this or am I alone? In trying to diagnose: Where that particular revision log ...
3
votes
0answers
83 views

What is the underlying logic for generating an icon map for a custom registered layout?

There seems to be a dearth of information on the internet about how to generate an icon_map for newly registered layouts in Layout Builder. I've gotten as far as finding a patch file from the project ...
4
votes
2answers
317 views

Delete a block of all layouts

I am using Layout Builder (Drupal 8.7.1) I have a block in several Layouts. How can I programmatically remove all instances of this block and update all layouts without the message "This block is ...
0
votes
0answers
76 views

Is there something I'm missing in getting this to work correctly?

I followed this tutorial but am having some issues. I enabled menu_link_extras and layout_builder on my site. I enabled layout builder on my menu, added a menu link and added a block to that link's ...