Just read your nice blog post. :) Sorry, I know I mentioned very often, and always said I'd want to make it more sexy before posting, but never really found the time to do it.

So this archive contains a Panels layout that I'm using on several sites -- which allows you to re-use the theme's regions and assign content to them.

Quite trivial... the CSS is not even required.

Not sure whether this fits better here or for Panels directly -- anyway, just wanted to get this finally into the wild. I suggest trying it, it's kinda cool. :)

CommentFileSizeAuthor
theme.zip1.74 KBsun
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Zach Harkey’s picture

OMFG! That is so awesome.

Zach Harkey’s picture

After much experimentation with sites using both Panels and Panels Everywhere I found Sun's trick for reusing theme regions to be more valuable than the ability to create site templates. His method also works with or without Panels Everywhere. This got me wondering if there is a way to reuse PE's Site template regions in this same way?

merlinofchaos’s picture

I've never been quite sure what to do with this or where to put it. It is interesting but I fear it is also very confusing.

sun’s picture

I guess this panels layout idea rather belongs into Panels' queue, not Panels Everywhere... Not sure though, since I didn't use Panels Everywhere yet.

A proper implementation would have to

1) actually read the available layout regions from the (site's default?) theme

2) somehow prevent that this layout suddenly gets different regions from a different theme

3) perhaps use the theme's screenshot or something as layout icon

Furthermore, the approach is limited in that panels panes are either output before or after regular blocks in the theme's regions. Although there may even be ways to solve the before/after limitation (two panels layout regions per theme region + override http://api.drupal.org/api/function/theme_blocks/6 in some way), it won't allow you to mix blocks and panes freely. However, until now, this never invalidated the approach. If all fails, you can still configure your panel to skip block regions, and simply re-populate them via panes. D7 may allow advanced ways to intermix both.

squiggy’s picture

subscribe

drupalninja99’s picture

+1 for using theme regions, it would be great to have a variable called 'sidebar left' that you place in your panel.

you would have the option of using panels for block placement or context for block placement. right now you dont have that choice.

yareckon’s picture

This is actually a really sexy approach, allowing you to combine hand placed content from a pane with automatic global content in the theme regions handled by the devseed context module or something.

mansspams’s picture

Status: Needs review » Active

suns files does not work properly 'as is' so marking this as active. As I understand its just proof of concept?

Maybe there could be a way to feed any template region same contexts? via themes page preprocess?

mansspams’s picture

There is issue over at Context module #305289: Integration with Panels module, they are working on exposing Contexts to Contexts (lol) As I understand, goal is something that PE is trying to achieve, but using theme regions and drag-and-drop admin module integration. Maybe, Merlin, you could drop a comment there?

Jacine’s picture

I really like this idea.

Letharion’s picture

I'm reading the issue, trying to understand what this does. Unfortunately, I don't.
In my head Panels is a way of not having regions, so this makes no sense to me ;)
Could someone elaborate on what the idea is here? :)

jherencia’s picture

DamienMcKenna’s picture

Issue summary: View changes

I'd honestly love to get this working and push it out as v2. Just need time :(

DamienMcKenna’s picture

Title: Re-use theme regions » Control theme regions
Version: 6.x-1.x-dev » 7.x-1.x-dev