Hello, this is my first post on these forums. I apologize if it has been answered or is in the wrong place. My question involves the panels module.

I work on a drupal 6 site that was set up by someone previously. This person set up a panel page called myPanel using the panels module. In the content tab there is a piece of content called myMenuOne. This is a menu which shows up in the site's menus list, and nowhere else except as a nonconfigurable block in the blocks list (which I understand is generated from the menu).

When I visit myPanel in the browser, myMenuOne is themed to show up within a container class, and works fine. It seems as though the themeing is being done from block.tpl.php.

The problem is if I create a new menu, say myMenuTwo, and add it to myPanel through the content tab, it does not behave the same way. No container class, it is not going through the same themeing. Even if I add a second instance of myMenuOne, the new instance does not behave correctly, though the original menu does.

There are no contexts generating the content. There is no specific .tpl.php file for myMenuOne or myPanel. myMenuOne is not a "custom content" or "existing node" and does not appear under any "Add content" categories except for "menus". Unfortunately the add content tab of the edit panel page doesn't tell me what type of content existing blocks are.

There are also differences in the classes that are being generated:

Old (working) myMenuOne:

<div class="block block-menu" id="block-menu-menu-mymenuone">

New instance of myMenuOne or new menu myMenuTwo:

<div class="panel-pane pane-block pane-menu-menu-mymenuone">

It seems that the solution would either involve some method of placing menus into a panel of which I'm not aware, or figuring out how to theme the menus themselves. I can't seem to figure out how to do either of these. I would be happy doing it either way. Any help is greatly appreciated.


Deltaz’s picture

As this post pops up first when I search for this issue, I thought I would post a quick fix I came up with. I am new to Drupal so perhaps there is a better way to do this, but it solved the problem for me.

In panels-pane.tpl.php above where it prints the normal content I added this if statement:

<?php if (preg_match("/menu-menu-(.+)/", $pane->subtype)): ?>

//themeing stuff and printing content for the menu blocks

<?php else: ?>

//default code for printing non-menu content

<?php endif; ?>