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

geraud - January 21, 2009 - 17:33

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

mikeytown2 - January 31, 2009 - 20:21

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

drewish - February 2, 2009 - 08:23

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

fuerst - November 10, 2009 - 11:05
Status:active» needs review

Nodes overwritten by Panels node_view still have the node/<nid> URL internally. You can get the $node object by calling node_load() using arg(1) for the nid.

The attached patch modifies Menu Trails by loading the $node object in menutrails_init() and calling menutrails_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.

AttachmentSize
menutrails-362065.patch 643 bytes

#5

rburgundy - November 10, 2009 - 00:13

subscribing

 
 

Drupal is a registered trademark of Dries Buytaert.