NKP
NKP

Reputation: 109

How to make sure region layout stays consistent over the website in Drupal

I've a weird issue in my Drupal 9 website where a couple of regions (subfeatures and footer) get rendered differently in different pages with no consistent behavior.

They are loaded via the theme's default page.html.twig and should render inside the page js-layout wrapper as in below screenshot

enter image description here

But in some pages, it gets rendered outside the wrapper like in the below screenshot

enter image description here

This is simple website with no overrides on the theme level for the regions so this is quite strange

Upvotes: 0

Views: 93

Answers (1)

Schwarz Developing
Schwarz Developing

Reputation: 293

Without knowing the theme, it is difficult to give an answer. (Which theme is used, which templates (which Twig file provides the theme) and so on...

But let me try to give you a starting point:

  1. Check all twig files of your theme

If there is a multiple for page, like: page.html.twig & page--article.html.twig. Then check the HTML structure for it

  1. Check the region's conditions

In the page-twig templates, check if the HTML closing tags depend on the region conditions. Is there a condition that the div sometimes closes earlier?

I hope this will help you.

Upvotes: 0

Related Questions