People who code: we want your input. Take the Survey

Questions tagged [layout-builder]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
35 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
14 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
42 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
18 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
20 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
47 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
40 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
92 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
45 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
161 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
37 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
50 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
11 views

Change default text on exposed filter select option

I have a layout builder inline block that I use to pass variables to exposed filters in a twig tweak view embed. ... {{ drupal_view('events_group_content', 'filtered_events', event_type, center_id, ...
0
votes
0answers
80 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
40 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
544 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
31 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
401 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
112 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
42 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
315 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
198 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
243 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
46 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
345 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
332 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
197 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
860 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
310 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
57 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
273 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 ...