Questions tagged [layout-builder]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
16 views

Custom block plugin does not show in Layout Builder options

Newish to Layout Builder - we made a custom block plugin that renders a custom form. When I go to a page with Layout Builder and try to add that block... it is not in the list of blocks. /** * ...
0
votes
0answers
11 views

Argument 6 passed to Drupal\layout_builder\Plugin\Block\InlineBlock::__construct() must implement interface

I was upgrading Drupal 8 to 9. I installed 'Upgrade Status' module and fixed as suggested by it. Now it was time to upgrade to D9. I changed on composer.json. "drupal/core-composer-scaffold":...
0
votes
0answers
23 views

Unexpected error from a layout page

I am working with Manage display, but for one of my pages I get an error occurring on the Layout page. Error: Call to a member function getEntityTypeId() on null in Drupal\layout_builder\Plugin\Block\...
3
votes
1answer
93 views

Prevent rendering of Layout Builder regions that have no content

Using Layout Builder, when you add a block to a layout that has access controls and a user visits a page without access, the layout is empty. How does one prevent the layout from rendering at all if ...
0
votes
0answers
40 views

I get an error when I upgrade

I get the following error when upgrading the database via the /update.php page. I managed to update everything in composer, I am just stuck to at this point. TypeError: Argument 1 passed to Drupal\...
1
vote
0answers
37 views

Is there a way to specify which content should be shown from the the "Entity View (Content)" block?

As part of CTools, there is the "Entity View (Content)" block that can be used in Layout Builder, but that only shows the current content. Is there a way to specify another piece of content? ...
3
votes
0answers
19 views

QuickEditIntegration can't process components for Quick Edit

I have a content type that is displayed with Layout Builder. When I view it in default mode, the Quick Edit option does not appear in the contextual menu. This is because none of the fields have the ...
1
vote
2answers
39 views

How to restore layout builder override layouts from old DB snapshot?

After upgrading from Drupal v9.1.7 to v9.2.0, on a lot of nodes the custom layout builder override layouts were reset to the default layout, resulting in a massive data loss. To make things worse, ...
1
vote
0answers
29 views

Why do drupal-media elements not get rendered in Layout Builder CKEditor?

In Layout Builder, add a custom block. When editing the block in CKEditor, add an image using "Insert from Media Library" button. Exit CKEditor. Re-edit the block in CKEditor. Result: I do ...
3
votes
0answers
64 views

How to setup access dependency on a block content created programatically

In Drupal 8, I am creating block instances (BlockContent) for node layouts programatically and setting them all as non-reusable. That causes a following access error: "Non-reusable blocks must ...
0
votes
0answers
36 views

How do I build custom options for sections?

I manage to build/define some custom blocks with my own parameters/form elements when placing them, so I'm looking to do the same with sections. I've seen that the core code does that, but ideally I ...
0
votes
1answer
20 views

Unable to edit custom block without administrator permissions

I created a content type "landingpage" and a user role "editor". I enabled layout builder for this content type and enabled the option to overwrite the the layout for individual ...
1
vote
1answer
57 views

Programmatically enable the entity view display

I would like to programmatically enable the Layout Builder module. I followed the instructions given on Layout Builder — building Drupal 8 layouts, but they don't seem to work. They might be outdated ...
0
votes
1answer
43 views

Import single view configuration fail - layout_builder__layout will not exists after import

I have Drupal 8.9.13 and I want to export/import single views configuration to other Drupal 8.9.13. I can select single view to export, but when I import it I get the next error: The configuration ...
0
votes
1answer
24 views

icon_map in PHP annotation instead of layouts.yml

I need to add an Icon to a layout added by a contrib module. But I see it is adding the layout via plugin PHP file instead of layouts.yml. The annotation looks like following /** * A very advanced ...
0
votes
0answers
59 views

Suggested template is not picked up

I am using Layout Builder and I would like to tweak template file a bit. I can see suggestions here: But although I added file layout-twocol-section--node-npx-training-teaser2.html.twig in my theme ...
0
votes
1answer
45 views

How do I attach a single-use block through a field?

I am working on a project that has a lot of custom block types (about 35). They are complex and have a lot of fields. They are being used with Layout Builder so all the blocks that get created are ...
0
votes
1answer
137 views

How do I update the section component configuration?

How to update a component in the node's layout builder? I have used the following code. $node = \Drupal\node\Entity\Node::load($nid); $layout = $node->get('layout_builder__layout'); $sections = $...
0
votes
1answer
89 views

Pre process a template that uses layout display

I want to preprocess a user account display. I want to manipulate a field value at display time. for example, i want to change: field_prefered_color: redto : field_prefered_color: red - Cool, that is ...
1
vote
1answer
222 views

How do I store custom block content as configuration?

I'm creating custom pages using Pages + Layout Builder. These layouts need to be stored in GIT as config files (drush cex). Currently, the layouts themselves are stored fine. The main problem is that ...
0
votes
1answer
43 views

How do I create custom layouts for Panelizer?

I was wondering how do you create custom layouts for Panelizer in D8? In D7, I can easily create my layouts, and just add a couple of lines on my .info file to let Drupal know where my layouts are. I ...
0
votes
0answers
61 views

bootstrap_barrio subtheme breaks ckeditor's media insert in custom block

I'm facing this problem (seems to be producible) in a contrib theme that breaks the ckeditor media insert button on custom blocks in the layout builder of individual nodes... The javascript error says ...
0
votes
0answers
110 views

How to set an ALL option on contextual filters passed to a view with twig tweak?

In Drupal 8, I have a twig tweak embedded view that passes variables from the Layout Builder dialogue to filter results in a custom block. {% set event_type = block.field_filtered_events_event_type....
-2
votes
1answer
42 views

Missing some block fields

I'm working with layout_builder and page_manager together and I'm having some issues. I want to add an existing node to my right sidebar, but I don't see the option anywhere where I can do that. In D7,...
1
vote
4answers
770 views

How to export the config files of a content type to a module?

I have a custom module. I created a content type and added some fields to that content type. I also enabled the layout builder on the manage display of the content type Then I run drush -y cex to ...
1
vote
0answers
34 views

Create a layout on a user route

I'm trying to add a Moderation Dashboard tab to the user page like the Moderation Dashboard module, but I can't use Panels. Is it possible to create a layout on a route using layout builder? I've ...
0
votes
1answer
681 views

How do I remove an unused patch?

I'm trying, for the first time, to add a patch in composer.json, for a layout builder issue (https://www.drupal.org/project/drupal/issues/3045171#comment-13450756). It's the first time I do it, I see ...
0
votes
0answers
137 views

Change the width of the off-canvas dialog

Layout Builder uses the off-canvas dialog. It comes out from the right side of the screen at a max width of 300px. We'd like to make it wider. I can do this with a powerful CSS rule, but is there a ...
1
vote
1answer
59 views

Unable to see page context in cache context

I created a page using Page Manager with Layout Builder. I created a path called: /my-account/{agent_number} witch allows me to create the agent_number string context. I created my own custom block ...
0
votes
1answer
52 views

Solr Search Custom search form template

I have solr search setup on my drupal8 website. I have a view setup that has two pages in it. I have the search box via an exposed form placed as a block in my header region. What I want to do is to ...
0
votes
1answer
335 views

How do I 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
0answers
207 views

How do I delete/remove a broken configuration?

I'm using Layout Builder to manage the display of a content type. I was playing around with the config and adding different things, and something I added caused the page to crash and now I get this ...
1
vote
1answer
289 views

How do I make rows of views blocks on a basic page 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 ...
-2
votes
1answer
47 views

Add modifier class to module block on custom content type

I'm trying to alter the display of a social media share block module im using on my site on a custom content type. All throughout the site the share block looks like this, floating on the left side of ...
2
votes
0answers
381 views

How do I nest a layout? [closed]

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 ...
0
votes
1answer
359 views

Export blocks added as default content

I am using Layout Builder to add blocks into my nodes. I am adding several instances of different custom block types to specific content individually. I wander if it is it possible to export those ...
3
votes
0answers
217 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 ...
6
votes
2answers
944 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
331 views

Ajax issues with the "Add section" button

We're trying to use the new Layout Builder to configure some of our content types. When we click the "Add section" button under Manage Layout, we get the following errors: On the page in the ...
0
votes
1answer
59 views

How can I hide the authoring information?

Normally I would just click manage display and disable authoring information from showing, but with layout builder enabled, I don't have this option. I only have the Manage Layout option, which doesn'...
2
votes
0answers
276 views

Move the configuration by features [closed]

There is a module in the D8 core - Layout Builder. The functionality is enough for my needs. I need initiate the settings by a profile and also have possibilities to move configurations from stage to ...