Questions tagged [regions]

In a Drupal theme, the places where blocks can be put are called regions.

Filter by
Sorted by
Tagged with
-3
votes
0answers
20 views

Get one Block from region In front page

I create region 'Top' in backoffice and I replace 'menu', 'block1', 'block2' to that region . In front--page.html.twig I display this region by {{page.Top}}. My question : how to get 'block2' without ...
0
votes
0answers
35 views

Add a region to the page--front.html.twig

I've created a few new region in my yml regions: header: "Header" jumbotron: "Jumbotron" chiffres: "Chiffres" steps: "Etapes" presentation: "Presentation des formules" ...
0
votes
0answers
52 views

How am I meant to display different elements on different pages?

I'm coming to Drupal from more conventional MVC frameworks (Laravel, CakePHP, etc.) In those frameworks, if I want a specific element (say, a form) to appear only on specific pages, then I basically ...
0
votes
0answers
25 views

I accidentally removed the core blocks from content region

I accidentally remove the core/system blocks that normally sit under the content region and now I am not able to access any of the administration page. If I visit my site/user/login, or register, etc,...
0
votes
0answers
17 views

Custom regions are wrapped

I am using Bootstrap Barrio sub-theme in a Drupal 8 site. I want to add regions similar to the "featured_*" regions. The regions are added into the info.yml file regions: # ... origional regions ....
0
votes
1answer
104 views

Template preview not working properly

I've got a huge problem with my template preview. For all of my post (page, article and so on), I have not the good region in my page. My theme is extended Classy. If I go to see the page (not ...
0
votes
0answers
45 views

Region with menu block disappears suddenly, re-appears after re-saving menu

We have a website with a menu in a block, that is placed into a region "Sidebar". My customer notified me that the whole region containing the menu keeps disappearing on the live site, on average once ...
0
votes
1answer
25 views

Place a custom block inside admin area

How is it possible to place a custom block inside the admin area? (e.g. in a node edit form)? I tried with page restriction but with no success. How can I see the block regions of the admin theme (...
0
votes
1answer
28 views

Putting footer region under body tag

I'm fairly new to drupal and this is my first time posting on stackexchange. Constructive critisism and feedback are more than welcome. All regions in my custom theme are placed inside the body tag ...
1
vote
0answers
221 views

Trouble Hiding Regions When Blocks Are Empty

Having trouble seeing why my regions render when I think they shouldn't... page.html.twig: {% if page.region %} {{ page.region }} {% endif %} region.html.twig: {% if content %} <div id="" ...
0
votes
0answers
16 views

When is region.tpl.php used?

I've got a Drupal 7 site, and I'm working with regions. It seems that no matter what theme I use, /modules/system/region.tpl.php will never be used / applied. It seems that any hook_preprocess_region ...
0
votes
1answer
142 views

How to split region block render?

Is it possible to split the rendering of the blocks in a region ? I have see this question Drupal 8 - How to split display the blocks separately in region.html.twig attempting to solve this by using ...
2
votes
1answer
945 views

Hide block if content is empty not working

I want to hide an entiere block is it has not result. I went into my view, then I add "Contextual filter", "Empty", "Hide view". But my view is always hidden if I do this, and I don't understand ...
1
vote
1answer
19 views

Page region CSS class not applied

I am working with Drupal 8.5-x, I am trying to render HTML with bootstrap classes, but I am having trouble. Here is my problem: I have highlighted (region) and content (region). I am trying to add a &...
0
votes
1answer
293 views

Drupal Bootstrap - Regions Placement

I'm making my first attempt at creating my own Sub-Theme of the Bootstrap theme. I've got the theme installed, the sub-theme created and working, I've added some new regions and populated them. The ...
1
vote
1answer
958 views

How to render a region in custom module twig template

I have rendered regions in page.html.twig using {{ page.region_name }}. But it doesn't work for the custom modules template. How can I render a region in custom template?
0
votes
0answers
20 views

Plugin block not displayed in views page

I have a created views (page) to display the number of news articles created in each month (This displays month (number of articles) added in that month like May(12)). I created a content page and ...
0
votes
1answer
24 views

Layout problems (backgrounds and blocks region)

I'm a non professionist dealing with drupal for the first time and it's killing me. I'm trying to create a page without having to code but it seems impossible! I need to adjust the position of the ...
2
votes
2answers
83 views

Unset regions for specific content type

I want to create a special content type that doesn't include the logo and main navigation. I have a helper module and have added the following section before renenabling it but it doesn't seem to be ...
0
votes
1answer
44 views

Move a taxonomy page field to a different region

I currently have taxonomy pages using a custom image field, field_icon, which by default displays in my content region. How would I go about moving this field display to a different region (in my ...
2
votes
2answers
797 views

Add image field or other fields from node to a custom Block in Drupal 8

I am new to Drupal and I am learning pretty fast. However I am stuck on an issue. I need to make a custom Block for my content (node) images. There is a system-made content block which pulls from ...
1
vote
0answers
119 views

Separate blocks in region

I have a Footer region defined for my theme, and it has two blocks in it. I have a region--footer.html.twig file and both blocks are rendered with {{ content }}. The issue is, I need to wrap both ...
0
votes
4answers
604 views

Render a menu differently based on region

I use Drupal 7 and I’d like to have two menus rendered different: one in the nav bar showing dropdowns links for child pages, and another that simply lays out all links in the sidebar. While I can get ...
-1
votes
1answer
388 views

Express block in region template

I have region--footer-sustain.html.twig which is expressed in templates via {{page['footer_sustain']}}. Client wants some content moved into the CMS so I added to theme_info.yml these regions: ...
0
votes
1answer
3k views

How to add custom region in bootstrap theme Drupal 8

How do I add a custom region in the bootstrap theme using Drupal 8? I have installed a bootstrap theme and now I want to add a custom region before Header region. Want to know how to add in theme.info ...
0
votes
1answer
691 views

Set regions size

Very new Drupal user and I'm building a theme for my site on Drupal 8, I've setup everything, the site works locally. Now I would like to know how do I make my regions look like the schema (see Image)....
0
votes
1answer
348 views

Block title not show for exposed filter

My exposed filter's form is placed in a region, within a block. I have activated the Config Block > Display Title option (I also overrode the title) but I see no title (a h2 should be added on top of ...
2
votes
1answer
817 views

Region for the footer not working, but the header is working

I have the following regions set up in my *.info.yml file: name: Test type: theme description: 'Theme' base theme: stable core: 8.x regions: header: 'Header' content: 'Content' footer: 'Footer' ...
2
votes
1answer
603 views

How do I display two blocks separately?

In my header region, I have two blocks: menu and search. I want to add some other HTML between them. I tried using {{ content.menu}}, but it doesn't actually do return anything. I can split up the ...
0
votes
1answer
54 views

How do I place a block in a region, programatically?

Why isn't my custom block rendering in the region I want? It shows in the content region, not my custom content_right region. function bootstrap_preprocess_html(&$variables) { if (\Drupal::...
1
vote
1answer
28 views

Block is displayed on page even though no region is selected, how is this possible?

I am fairly new to drupal, while doing some maintenance I came across a situation that I don't understand A block, which is defined inside a view has no region selected, yet it appears on pages ...
0
votes
1answer
388 views

How to render only markup in region template?

I have created a region--footer.html.twig template which only contains the static markup for the footer. Now I would like to render this region at the bottom of each page so I have added the following ...
0
votes
2answers
3k views

Custom region twig template for region into node twig template

I did add a custom region to my theme via my .info.yml file : regions: node_col_1: 'Bloc pour colonne 1' and in my .theme file to make it available for node template: function ...
0
votes
1answer
240 views

Placing Content Outside of Region Container

My custom bootstrap sub-theme has a main content region which is the place that all the main content is to go within a .container class. The code for that section is as follows: {# Main #} {%...
0
votes
1answer
31 views

How do I get the content of a Panel variant to display on as Content?

I've made a module that you can add to a Panel Variant's Content section by clicking a region's gear icon and selecting 'add content'. This seems to work fine and I can view the module's output if I ...
0
votes
0answers
59 views

Programmatically rearrange blocks in region and save in database?

Need to react on site events and regroup blocks in front. I have my region 'Top' in front, configuration is like this: Block2: India News Block1: World News Block3: Frontpage content When new ...
1
vote
1answer
51 views

How to detect the region of a block programatically

I need to create a custom submit handler when blocks that are assigned to a certain region are saved (whether an existing or a new block) I am using : function MY_MODULE_NAME_form_alter(&$form, $...
2
votes
2answers
1k views

Render a region e.g page.sidebar_first in views-view.html.twig

Is it possible to render a region e.g sidebar_first in a views twig-file views-view.html.twig?
1
vote
1answer
53 views

How to show one field in more than one regions?

I'm using Drupal 7. I have used two column stacked layout to display Node Fields. I created one Rating Field and I showed it in top region. I want to show the same field in bottom region also. How can ...
1
vote
1answer
85 views

Display Content Type Field in region--footer.tpl.php

First of all I am overriding the default footer template with my own using region--footer.tpl.php. In the footer I need to display the fields I have in a content type named 'footer'. Can anyone help ...
0
votes
1answer
193 views

How to add programmatically region's class when region had block in D8?

I have one row three column region. How can I add custom class on each region when one of region is not work? When three regiosn work, classes will be below |------------|-------------|--------------...
1
vote
2answers
816 views

Insert region into html.html.twig

Is there any way to add a region into html.html.twig? I want to have one inside tag to be able to render different js counters through Block Layout
0
votes
1answer
45 views

Placing user login and user menu at the bottom right when this is not supported by the theme

I'm new at Drupal and am building a site with the Bootstrap theme, and i would like to place the user login and user menu in the lower right corner. Unfortunately there is no region for that, there is ...
1
vote
1answer
2k views

Determine which region a menu block is rendered in

I need to re-use the same menu in two different regions, with slightly different markup. My thought was to simply check which region the block was being rendered in, and use if statements to modify ...
2
votes
3answers
453 views

Hide a region with empty view in it

I have a region page_intro where I display a view, with some CSS on it. When the view is empty (return no result), the region is still displayed (All html code before and after {{ page.page_intro }}). ...
0
votes
2answers
352 views

How to let a user to switch between blocks that need to be shown?

I have pre-defined blocks A,B and C that are meant to be placed in the sidebar_first region. What I would like to achieve is: a visitor could select the block that needs to be displayed for the ...
1
vote
2answers
381 views

Dynamic weight for Blocks

I want to change the block weight in sidebar for each page request, So the blocks position would be change for each request. Is there any way to do it ?
3
votes
3answers
1k views

How do i get the all the regions available in the current theme programatically?

I want the list of the names of all regions available in the current theme in drupal 8. How to do this ? And is it possible to get the list of the blocks placed on that region ?
4
votes
1answer
2k views

how to check messages exists

I want to check is there any messages in my template in drupal 7 there was a global variable in page template variables messages now in drupal 8 I want to check is there any message but messages ...
1
vote
1answer
72 views

Custom Region Empty

I have created a custom region in my bootstrap sub-theme. The line in my .info file is: regions[conent_bottom] = 'Content bottom' I have then added that to my page.tpl.php file using: <?php ...

1
2 3 4 5