The README file of Panelizer mentions this under Future functionality:

- Implement panel subtabs. i.e, allow node/27/arbitrarylink to be a subtab
of an entity, using Panelizer.

I think I could get a patch started on this with a push in the right direction. Where should I look?

Comments

merlinofchaos’s picture

The hard part is actually defining the paths without making things explode via hook_menu.

The way that og_panels accomplished this was to define several paths like this:

node/%/tab1
node/%/tab2
node/%/tab3

Up until whatever the 'maximum' number of tabs was.

Then it used aliasing during node_save to alias the tab to the proper path for the tab.

Once you've got that part, the rest is just associating the information appropriately. That part seems like it might work best with an entity reference of some flavor, so that you have something to easily attach the panel to. Maybe not an entity reference specifically, but something that says "This entity is a subtab of that entity and it's using tab slot X" (where X is going to appear as a weight value) and it has this path as a tab. That entity probably wouldn't be a node, but it WOULD need to probably inherit editing permissions from the parent node so that they can be edited as a group.

Is that enough of a nudge?

damienmckenna’s picture

How about just a per-entity setting that controls which view modes are available as tabs?

stevector’s picture

This makes sense to have stub entity associated with each path. Unfortunately the client has decided to go in a different direction so I'm not sure when I'll be able to come back to this.

amitaibu’s picture

That entity probably wouldn't be a node

Can't we be using the PanelizerEntityNode itself, and make it reference the node itself?

merlinofchaos’s picture

Sure, it doesn't need to be a separate entity, I suppose, if all of the information you need is on the core entity that's perfectly fine too. As long as you can handle the menu routing, honestly the rest isn't nearly as difficult.

Anonymous’s picture

Issue summary: View changes

Has there been momentum on this feature? I've run into needing sub-pages built off a single node type. I'd like to not use views, though it doesn't necessarily seem like a bad way to go about it. I figured a Panel solution would be a tiny bit cleaner.

Is the a feature now built in? Or is this doable in another way?

damienmckenna’s picture

@drewbolles: This functionality hasn't been built yet. That said, there are some generic solutions for doing this, e.g. https://www.drupal.org/project/view_mode_page