Here's what i'm trying to do, how I'm trying to do it, and the problem I'm running into. Any assistance would be greatly appreciated.
What I'm trying to do:
I have a content type called Project. When you look at a Project node i'd like to see that nice panels page I've created and I'd like that page to have some menu tabs across the top which navigate to other things relevant things about the project.
Here's what I've done:
I moved the Project page from a variant of node/%node to it's own page: node/%node/project.
I adjust the menu settings for node/%node/project so that it is a default tab. I set the parent menu item to be an item in secondary links... whatever.
I created all the pages for the tabs (node/%node/project_tasks, node/%node/project_meetings, etc.) and set them to be menu tabs.
I set the access rules for all of the above pages to be accessible on node type: project. That way my tabs don't show up on other node types.
So this is what I got:
I browse to my project node. It looks great and works perfectly.
The problem... nodes of any other content type show up as Access Denied!
My guess at the cause of the problem:
The parent menu item is trying to point to the default tab regardless of the content type.
As I understand menu tabs, you set one of the tabs to be the default tab. With the default tab you configure the parent menu item. When you browse to the path of the parent menu item Drupal shows you the page at the path of the Default tab.
The path of the parent item is always one level up from the default tab. So in my case the parent item is node/%node.
This means ANY time you go to node/%node drupal tries to load the page at node/%node/project. But if %node is not a project, then according to the access rules for node/%node/project you do not have access to that page So the result is access denied on any node that isn't a project.
So my guess is there isn't a fix for this, but there may be a workaround. I've tried a couple of things and they all have drawbacks for various reasons. Rather than going on about what I've already tried, i'd like to know if anybody else has any suggestions for how to get menu tabs on a specific content type.
As assistance would be greatly appreciated.
Comments
Comment #1
merlinofchaos commentedI think your problem is most likely with this step right here. node/%node already exists, so I think you need to tell it that the second parent item already exists or you're going to run into problems. Secondary tabs are a pain in the BUTT in Drupal so this may be something that you struggle with for awhile. Maybe you need to move away from node/%node entirely if that's how you're going to do it?
Comment #2
mehoo462 commentedThis magically started working. I wonder if some cron runs/cache flushes made the access rules work better.