Panels Override Support
smithn.nc - January 21, 2009 - 15:12
| Project: | Menu Trails |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
Hello,
I'm currently using Panels2 in my Drupal 6 site to do a node-override for a couple node types. The overridden nodes don't seem to respond to Menu Trails settings. If I disable Panels, Menu Trails works as expected for each type.
Would it be possible to allow Menu Trails to set the menu parents and breadcrumbs for Panel Pages that are catching certain node types?

#1
I face this problem in Drupal 5 too.
Actually, I have Menu Trails up and running and I have primary links displayed on node pages.
But when I override a node type with panels, primary links disappear on node pages.
#2
It has to do with incomplete support for hook_nodeapi() in Panels
http://drupal.org/node/364280
The workaround if there is one, would be to replicate what this module does in it's hook_nodeapi() in hook_init() function. Accessing $node is the main issue in regards to hook_init(). I've stopped working on this, since it's low on my priority list. You can see that right now it's is a code workaround for Organic Groups. The same would have to be done for Panels
#3
well panels2 is really broken and is being overhauled for panels 3. so i'd argue against adding any special case code for it.
#4
Nodes overwritten by Panels node_view still have the
node/<nid>URL internally. You can get the$nodeobject by callingnode_load()usingarg(1)for the nid.The attached patch modifies Menu Trails by loading the $node object in
menutrails_init()and callingmenutrails_nodeapi()to let it do the node related stuff.That still applies to node_view overrides only and not to any other Panel page though. That's another interesting and much needed topic.
#5
subscribing