We currently wrap overlay.tpl.php around page.tpl.php, but themes need to adjust a lot of css (like hiding regions). Why not replace page.tpl.php with overlay.tpl.php instead? Overlay.tpl.php should then be considered a special lightweight page.tpl.php template.

Attached patch seems to work ok, apart from Garland needs extra css or a custom overlay.tpl.php.

Comments

casey’s picture

StatusFileSize
new12.63 KB

- following HEAD
- added separate overlay.tpl.php for garland

I think this approach (overlay.tpl.php overriding page.tpl.php instead of using overlay.tpl.php as a template wrapper around page.tpl.php) allows for cleaner HTML inside overlay. Maybe this is a sufficient alternative to #804158: Provide Variable for themes to know if one is inside the overlay or not also.

casey’s picture

StatusFileSize
new12.66 KB

Reroll

Status: Needs review » Needs work

The last submitted patch, overlay-aspagetpl3.patch, failed testing.

casey’s picture

Status: Needs work » Needs review

#2: overlay-aspagetpl3.patch queued for re-testing.

casey’s picture

StatusFileSize
new13.07 KB

Reroll

Status: Needs review » Needs work

The last submitted patch, overlay-aspagetpl4.patch, failed testing.

casey’s picture

Status: Needs work » Needs review

#5: overlay-aspagetpl4.patch queued for re-testing.

casey’s picture

Title: Overlay.tpl.php as replacement of page.tpl.php (currently being a wrapper) » Ease theming: Overlay.tpl.php as replacement of page.tpl.php (currently being a wrapper)
StatusFileSize
new13.08 KB

Reroll

casey’s picture

#8: overlay-aspagetpl4.patch queued for re-testing.

EvanDonovan’s picture

Seems like a good idea, but is this too late for 7.x?

David_Rothstein’s picture

I think this idea was already discussed and semi-rejected at #673174: Provide an option to use a page-overlay.tpl.php.

That said, a lot has changed since then. In an ideal world, the theme layer isn't where we should have to adjust for the presence of the overlay at all (in which case this wouldn't be needed), but we're definitely not there yet so it may make sense.

I also agree with Evan that this sounds like a Drupal 8 issue at this point.

ksenzee’s picture

Version: 7.x-dev » 8.x-dev
Component: overlay.module » markup

Yeah, looks like D8 to me. I'm not 100% convinced this would make theming easier though. It would be nice to hear from markup folks on that, so moving to their queue for now.

zmove’s picture

zmove’s picture

Hope to see that in 8.x. Actually, this is a little tricky to do what you want with overlay.

thedavidmeister’s picture

#8: overlay-aspagetpl4.patch queued for re-testing.

thedavidmeister’s picture

Status: Needs review » Needs work

patch has trailing whitespace and uses a tpl.php file instead of html.twig.

rooby’s picture

Version: 8.x-dev » 7.x-dev
Issue summary: View changes

No more overlay in drupal 8 (yay), so this is a drupal 7 issue only.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.