How to display a Panel Page as a tab for a specific node type?

Events happening in the community are now at Drupal community events on www.drupal.org.
kirilius's picture

I posted this as a support request but this group may be a better place for it.

I have just installed a fresh Drupal 5.6 and Panels 2 beta 2.

I have a custom node type called Destination. My goal is to add some content related to each Destination node as a separate tab in the main Destination node display.

Normally after viewing a node, I would see the two default tabs:
View | Edit
I just want to add another one, say called "Test Panel", so that when I am looking at a Destination node, I'll have 3 tabs:
View | Edit | Test Panel

This is what I am doing:

  • I create a new Panel Page
  • Give it a single-column layout for simplicity
  • Panel name: test_panel
  • Panel Path: node/%/test
  • In the Advanced tab I check both "Provide Menu" and "Provide Menu as Tab". Tab Weight = 5
  • In the Context tab I add the Node ID argument. A window pops up:
  • I give a title: Test Panel
  • I check my Destination content type under both "Node types" and "Own display"
  • Save
  • In the Content tab I select "Node ID 1 Destination" sub-tab and click the (+) sign in my panel. For simplicity I add some hard-coded text.
  • I click on "New Custom Content" in the pop-up window
  • I give it a title "Test" and some dummy body like "Hello world" and hit Add Pane
  • Save and go to Preview
  • I give the Node ID a value of 1 (such Destinaiton node exists) and the "Url of real panel" becomes "node/1/test". The "Hello world" panel contents appears below. I click on the newly-generated URL (http://my-site/node/1/test) and see the "Hello world" text and four tabs above:

View | Edit | Test Panel | Settings

... so at this point the new panel is displayed as a tab - just the way I want it. Now I click on the "View"-tab to display the main Destination node (with ID: 1). That happens BUT the new "Test Panel" tab disappears and I see again just the default ones:
View | Edit

So my question is: what am I doing wrong? How can I use Panel 2 to add some content as a separate tab to a node type?

Thanks a lot for your help!

Comments

Panels Menu Tabs?

robloach's picture

We might have to put together a Panels Menu Tabs module that uses hook_menu to create the panes ;-) .

This should work and be

merlinofchaos's picture

This should work and be pretty straightforward to do; I think there is a bug in the current menu implementation, though, because many people are having trouble with it.

Drupal 6 Menus

robloach's picture

The Drupal 6 menu system will help a lot of the issues that people are experiencing.

Panels

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: