Questions tagged [layout-builder]

The tag has no usage guidance.

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

Does Views block caching include language in cid?

I think this is likely a core bug (in which case I know it is not meant for Drupal Answers) but thought I would check here first to see if possibly I have just missed something in configuration? I ...
0
votes
0answers
15 views

How can I remove the configuration side panel?

I have two drupal websites (running on Drupal 9.2.10). Both of them use modules: Layout builder Layout Builder Asymmetric Translation Both websites have same configuration (and I don't do any theme ...
1
vote
1answer
38 views

How to translate the layout builder blocks of a node programmatically?

I am translating the nodes programmatically. Everything works fine except the layout builder blocks. When I try to translate it, it also changes on the source node. I have created a node in language ...
0
votes
1answer
75 views

How to alter Layout Builder block visiblity?

Is there a hook to alter block access for blocks placed using Layout Builder? I see there is hook_block_access; but sadly this is not triggered when the block is placed using Layout Builder. There is ...
0
votes
1answer
24 views

How to pass Paragraph ID from Layout Builder to Views?

This is a bit convoluted; so hopefully it makes sense: I have a parent entity: Event. Event has a Paragraph field on it: Sessions (paragraph type: Session). I use Layout Builder to format the Full ...
0
votes
0answers
34 views

Create a list of blocks and the pages they are currently being used on

We have a D9 site that makes extensive use of Layout Builder. One of the features our content editors use is creating a global custom block in the Custom Block Library and then on various pages they ...
0
votes
1answer
52 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
1answer
23 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
54 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
107 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
44 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\...
0
votes
0answers
38 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
20 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
41 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, ...
0
votes
0answers
34 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
1answer
89 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
44 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
77 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
66 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
28 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
69 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
54 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
172 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
143 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
281 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
46 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
65 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
137 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
45 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
1k 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
36 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
1k 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
168 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
65 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
66 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
350 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
220 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
329 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
51 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
425 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
403 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
241 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
1k 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
357 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
62 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
277 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 ...