I'd appreciate some clarification of the situation with panels.

I can see that the panels layouts have been removed because they're old and not really compatible with the latest Zen. Someone is working on updating them for Zen 5.1.

Am I understanding this correctly in that those layouts were used to define the sidebars and content area instead of those being defined in Zen? I guess when they were used, Zen effectively thinks it's showing just a big content area with no sidebars and Panels was dividing up that content area.

I want to understand what it is that those layouts provided that we don't currently have.

I have have built a Zen 5.1 subtheme with a left sidebar. I always want that sidebar on all pages. It's all looking good and working well. Is there any problem with me using Panels just within the Zen content area? I would use the standard layouts that come with Panels or perhaps build my own similar layouts.

I'm also looking at using Display Suite within the Zen content area which seems like a similar situation.



sylus’s picture

I too was curious about the best practice with Zen + Panels. I only started becoming a convert to panels after playing with the amazing panopoly distribution. ^_^

JohnAlbin’s picture

Version: 7.x-5.1 » 7.x-5.x-dev
Status: Active » Fixed

There's nothing special about Zen + Panels. Zen is just like any other theme if you are using Panels. We use panels extensively with Zen and haven't had any issues.

It sounds like you just need to learn more about Panels. I'm sure there are some good resources for that! :-)

sylus’s picture

This might help a bit:

What I do is have something like this so I can support both panels layouts + standard block regions with different templates.

$panel_page = page_manager_get_current_page();
  if($panel_page) {
    // add a generic suggestion for all panel pages
    $suggestions[] = 'page__panels';
    // add the panel page machine name to the template suggestions
    $suggestions[] = 'page__' . $panel_page['name'];
    // merge the suggestions in to the existing suggestions (as more specific than the existing suggestions)
    $variables['theme_hook_suggestions'] = array_merge($variables['theme_hook_suggestions'], $suggestions);

For the page--panels.tpl.php I then remove alot of the variables and only really have the following in the main content div and let panels take over control inside this space.

   <<?php print $tag; ?> id="main-content">

            <!-- region: Main Content -->
            <?php if ($content = render($page['content'])): ?>
                <?php print $content; ?>
            <?php endif; ?>

        </<?php print $tag; ?>><!-- /end #main-content -->

You are correct if you want to do more then just that you will have to use Panels everywhere. I'd love it anyone had more information on this :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

caschbre’s picture

@sylus... where did you put the if($panel_page) { logic?

Francewhoa’s picture

Issue summary: View changes

Related documentation about Panel templates with Zen at https://www.drupal.org/node/1728090
At the bottom of that page.