Questions tagged [regions]

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

60 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
48 views

Does having lots of regions create performance issues

I am building a site in drupal 7. All the contents are created using views.The themes structure is such that i have to use a lot of regions to display the blocks created by views. Its almost like one ...
2
votes
2answers
110 views

Regions are gone

I work with the Omega theme, but whenever I try to edit my regions, they are completely empty... As you can see on the image, there are no regions available, although there is content placed inside ...
1
vote
0answers
390 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="" ...
1
vote
0answers
138 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 ...
1
vote
1answer
209 views

How can I affect a custom block to a custom page/view in Drupal 8?

I know I can choose the page were the block Will be displayed but for a big website I Will have hundred block on same région on same admin menu, it Will be hard to handle this. Is there a way to ...
1
vote
1answer
73 views

Change display order of View block in Content area of page

I have a dynamic view block that is set to display in "content" region of a Basic page. The Basic page has a field that i want to display at the bottom (i.e. after view block) Question: I cannot ...
1
vote
0answers
34 views

insert image in custom region

new to drupal. I've added a custom region to my .info file and in the page.tpl.php file I'm printing that region <?php print render($page['banner_ad']); ?> The thing is, I want to add ...
1
vote
0answers
18 views

Theming inside blocks

I don't know the process to theme inside regions in Drupal 8. I have the knowledge to theme regions by putting {{ page.XXX }} in the twig file (with regions declaration in the YML file) .But for ...
1
vote
1answer
58 views

Are regions and features automatically created when creating a sub subtheme?

I want to inherit everything from a main theme except the layout. When I create the .info file and specify which regions and features I want are these generated automatically by drupal or do I have to ...
1
vote
1answer
974 views

Regions do not display in “Demonstrate block regions”

I wonder why some regions of my theme don't display in section 'Demonstrate block rerions'. This happens with some themes which I downloaded from Drupal.org, for example with the Software theme. Here ...
1
vote
1answer
43 views

Region not rendering on views page but works perfectly on regular pages!

I have a navigation_bar region set up in my .info file which renders perfectly on regular drupal pages but I have two pages which are made from Views, but nothing renders. I am using the superfish ...
1
vote
0answers
140 views

Custom CSS class for region in DS not working as intended

I've successfully created a custom layout in ds (display suite), assigning various fields (simple, code, image) to each of the regions in there. I've also managed to successfully create custom css ...
1
vote
0answers
59 views

What happened to my new Block Region?

I've added a "header" block-region to the theme I am using (I am using the Visia Theme) and I've done this like so: In my visia.info file: regions[header] = Header and in my page.tpl.php file: <...
1
vote
0answers
211 views

All HTML tags are automatically stripped from views block when placed inside a <select> element

I'm trying to use Views to create a custom block which will display the linked titles of all content of type "promotion" in a dropdown menu. Every result's title is displayed within an <option> ...
1
vote
1answer
59 views

MEGA MENU please help trying to assign it the right region but no luck :(

Hey can you guys please help me out iv tried researching and asking other but unfortunately have screwed it up many times and cant seem to get an answer out of anyone. Can someone please help me ...
1
vote
1answer
93 views

Create a Block to display Titles - even pages, view-pages, articles

In my theme I need to hide the title of content, even the content-type pages and the Views page, and put it in a separate block placed in an other region than the content one. I figured out how to ...
1
vote
0answers
72 views

Looking for a theme recommendation for flexible content region?

I am looking for a theme whose content region automatically expands to fill the sidebar regions when those shrink. ie the content region and sidebars must be in the same container with the content ...
1
vote
0answers
266 views

Enabling a custom module generates errors for undefined regions when blocks are enabled.

A custom module defines some blocks, with this sample definition: return array( 'info' => 'Site Header', 'cache' => DRUPAL_NO_CACHE, // @TODO change it later 'status' ...
1
vote
1answer
56 views

Best practices when choosing a method of displaying content?

This is a little broad, but I have a specific example. I'm new to Drupal, with a WordPress background. I'm getting some of the core Drupal concepts down, but I'm left with some questions. How do I ...
1
vote
0answers
146 views

Zen theme created new region but it is not pushing other divs down when it has content added to it - css related

Hello i am currently using 7.23 core version of drupal and have a customized version of the zen theme that i am using, in my markup i have added my own theme region regions [video] = ...
1
vote
0answers
1k views

change block region using template_preprocess_block() not working?

I'm trying to move a block from the content region to the sidebar region if the page is not the front page. I would think this would be fairly simple. I have the following code: <?php function ...
1
vote
1answer
328 views

How to hide empty 'Content Zone' div in Omega?

I'm using Omega and I have "Force this zone to be rendered" unchecked in the Content Zone settings, and "Force this region to be rendered" unchecked in the Regions settings. Any idea what would force ...
1
vote
1answer
85 views

How to manage placement of blog articles in omega regions

I want to be able to control which omega region blog entries (individual blog articles) are placed. They appear to be in the content-zone, but I have not seen how to control which actual region they ...
1
vote
0answers
87 views

Adding a region to the individual item pages under a node in the gallery assist module

I'm trying to force a region into the individual item pages of a node that's using the gallery assist module to be able to display blocks. I started off making a context and adding the gallery assist ...
1
vote
0answers
105 views

Editor role can only manage right region of page, no other region allowed

In drupal 7, I have a page that has 3 regions: header, right sidebar and footer. I also have 2 user roles: Admin and Editor. An admin should be able to create content, edit content, publish ...
0
votes
0answers
34 views

How selectively print the content of region.html.twig

I'm trying to modify the html of region.html.twig I've used a hook to override the suggestion: function my_theme_theme_suggestions_region_alter(array &$suggestions, array $variables) { if($...
0
votes
0answers
13 views

Add row after amount of blocks

I'm trying to archieve something that looks very easy for me, but I can't find the solution. I'm using drupal 9, bootstrap 3 subtheme. I have a region (region-buttons) that has multiple blocks. {% ...
0
votes
0answers
46 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
56 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
31 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

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
0answers
24 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 ...
0
votes
1answer
33 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
62 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 ...
0
votes
1answer
261 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 |------------|-------------|--------------...
0
votes
2answers
445 views

How to let a user 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 ...
0
votes
0answers
32 views

To extend the highlighted region to the sidebar second region

my current account page looks like: What I would like to do is to extend the highlighted region so it stretches to take the full width(highlighted + sidebar second), and having blocks in the sidebar ...
0
votes
1answer
34 views

Display region's blocks into user-profile.tpl.php

I created a view listing content type called stories. Then I created a block with this view. In mytheme.info file I have this code : regions[header] = Header regions[story] = Story regions[content] =...
0
votes
0answers
40 views

New region or module_invoke?

I'm developing a simple site and want to keep everything as simple as possible, without any unnecessary performance lost or redundat code. Design is pretty static, therefore no need lot of regions for ...
0
votes
1answer
254 views

Programmatically show field in different regions depending on content

I'm creating an Omega sub theme & three regions ("Sidebar 1", "Content" & "Sidebar 2") inside of the "Content zone". "Sidebar 1" & "Content" are both set to always show, "Sidebar 2" ...
0
votes
2answers
739 views

Rendering a region in region--footer.tpl.php

I have my social media links in my sidebar_first region. And these social icons are included in my footer. So in region--footer.tpl.php, I have rendered sidebar_first region but it is not displaying, ...
0
votes
2answers
722 views

Content Region Not Displaying

I'm relatively new to Drupal and am just squashing bugs on my first site. I have a region that I declared in my theme.info file: regions[alert] = 'Sitewide Alert' and I have a block that has a ...
0
votes
2answers
89 views

Adding a Block Into Region

Using several different themes, I'm looking to add a generic region to the bottom of each "content" section of my webpage. The code I have so far is. . . . with Social Share being the name of the ...
0
votes
0answers
833 views

How to add menus to my footer block (nested blocks)

I created a module in Drupal 8 called Footer and made it a block so I can include it in my Footer region in my theme. I need my footer to have two menus, one listing topics and one listing static ...
0
votes
0answers
189 views

How to programmatically change region for field instance?

I have content type with more then one regions. When I open admin page "Manage fields" I can see which fields are in which regions. Is it possible to change programatically, in which region some field ...
0
votes
2answers
593 views

How to make a custom block listen to context module?

I've been creating my own module that consist an array of blocks. I plan to print them using context as oppose programatically as I already have the module on use (no need to reinvent the wheel). ...
0
votes
0answers
207 views

How to define region template, and render it in page.tpl.php

I want to separate the header and footer wiht 2 tpl files with region, for avoid to write code repeatedly. That is my directory structure : ├── style.css ├── template.php ├── templates │   ├── html....
0
votes
0answers
108 views

When I click on the demonstrate block regions, I get an access denied message

I logged-in as an admin. And when I click on the demonstrate block regions, I get an access denied message in Drupal-7. I have cleared all caches. But, still get the same problem. Any idea how to ...
0
votes
1answer
459 views

How do I override the content region for a specific page?

I want to override the content region for a specific page, but using the hook page--mypage--region--content.tpl.php won't work. How should I name it? My site supports block override, I tested this ...