Panel plugins help

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

I have some questions about panels development.

I've recently figured out all the pieces of panels except relationships which I'm pretty sure I don't need yet; unless you guys know how it works and can enlighten me.

I want to override the node view page for certain types that I've got. For the tournament type I want to show a specific layout instead of using page.tpl.php or node.tpl.php or any variation thereof because that, well, it's almost worthless and panels is much more powerful even if more of a hassle in terms of development time.

Now, I want to override node/%node path for panels but even with the panels page disabled I still get an error that the path exists. It does but it's disabled and I can't do anything about it. Well, I guess that's fine but the issue lies in the fact that I end up with less functionality with these pages because it doesn't come with arguments (that I've developed) and I can't get the node context that they've created that I could be used. Or, at least, I am not aware of how to do this.

Now, I need to get the currently loaded node at page node/whatever. I can grab the argument in the render function and use node_load but that's silly as that isn't what it's for and defeats the purpose of using the plugins in the first place. My node carries extra information about itself in different tables that aren't linked to the content type so using just the node context would be worthless.

Basically I have a content type called tournament and there is another table called brackets that holds brackets relating to any given tournament. I need to be able to load that into my own context using the argument from the URL and get the node that was loaded by a different context.

The function signature for the context plugin shows ($empty, $data = NULL, $conf = FALSE). It has nothing to do with the argument and I can't use ctools_context_create('node', $arg) because I do not have the argument (although I can use arg()) but I'd rather do this the "right way".

Help will be greatly appreciated as this is the next, and very important, step in a very massive upgrade to an incredibly powerful internal module that I'm developing for Entercom Inc.

Code is here: http://andricvillanueva.com/sites/default/files/panelsplugins.zip

Cheers,
A.Villanueva

Panels

Group organizers

Group notifications

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