Hello folks,
Gotten further in my project, but now I feel like I have painted myself into a corner, and I hope someone can point me in the right direction.
I've looked through all the panels documentation and tutorials, but I am stuck.
I have one panel which has two columns:
col1: list of node titles based on taxonomy term col2: list of node details based on taxonomy term
When someone clicks on a node title or on a link in the node details, I want them to see another panel for the node, but in my case, this needs to be a node override.
I have made the node override just fine with /node/% and it shows a panel just fine.
Where I am stuck, is how to pass to the node override a second argument, so that I can still show a filtered list of node titles based on the taxonomy term of the node that was clicked.
so, what my panel needs to show when node/% is clicked is:
col1: list of ALL node titles based on taxonomy term of SELECTED node ID col2: the node view of just the current node ID
I "think" I have to do something with the context setting, but the example I read on: http://drupal.org/node/213733 doesn't seem to be relevant to this task.
I'm using Drupal 6 with panels 2 and the latest Views version.
Any guidance for which settings I need to change where would be really appreciated.
Thank you so much for your help!!
Sebastian.
Short answer: I don't think this can be done without a custom module.
Longer answer: Panels doesn't allow you to override the links presented by the content, so there's no way to pass a parameter as an argument on the url. You might be able to get away with, so unless views 2 (which I haven't worked with) allows you to overide the link url on a node, you won't be able to pass the argument. I think you'll need to write a module to save away the last term selected in a session variable so that you don't have to rely on it in the url. You would then have to write a context parameter hook in the module to make this avialable via panels. If anyone else has a clearer idea of how to do this, I'd love to hear it.
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of sebastian Sent: Thursday, April 16, 2009 9:36 AM To: support@drupal.org Subject: [support] help with panels, node overrides and context
Hello folks,
Gotten further in my project, but now I feel like I have painted myself into a corner, and I hope someone can point me in the right direction.
I've looked through all the panels documentation and tutorials, but I am stuck.
I have one panel which has two columns:
col1: list of node titles based on taxonomy term col2: list of node details based on taxonomy term
When someone clicks on a node title or on a link in the node details, I want them to see another panel for the node, but in my case, this needs to be a node override.
I have made the node override just fine with /node/% and it shows a panel just fine.
Where I am stuck, is how to pass to the node override a second argument, so that I can still show a filtered list of node titles based on the taxonomy term of the node that was clicked.
so, what my panel needs to show when node/% is clicked is:
col1: list of ALL node titles based on taxonomy term of SELECTED node ID col2: the node view of just the current node ID
I "think" I have to do something with the context setting, but the example I read on: http://drupal.org/node/213733 doesn't seem to be relevant to this task.
I'm using Drupal 6 with panels 2 and the latest Views version.
Any guidance for which settings I need to change where would be really appreciated.
Thank you so much for your help!!
Sebastian.
-- [ Drupal support list | http://lists.drupal.org/ ]
With views 2, you can always put a small snippet of PHP code for argument fetching.
May the panel module allow the same thing?
A small snippet in a textarea could be better than a custom module sometime :)
Le jeudi 16 avril 2009 à 11:31 -0700, Metzler, David a écrit :
Short answer: I don't think this can be done without a custom module.
Longer answer: Panels doesn't allow you to override the links presented by the content, so there's no way to pass a parameter as an argument on the url. You might be able to get away with, so unless views 2 (which I haven't worked with) allows you to overide the link url on a node, you won't be able to pass the argument. I think you'll need to write a module to save away the last term selected in a session variable so that you don't have to rely on it in the url. You would then have to write a context parameter hook in the module to make this avialable via panels. If anyone else has a clearer idea of how to do this, I'd love to hear it.
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of sebastian Sent: Thursday, April 16, 2009 9:36 AM To: support@drupal.org Subject: [support] help with panels, node overrides and context
Hello folks,
Gotten further in my project, but now I feel like I have painted myself into a corner, and I hope someone can point me in the right direction.
I've looked through all the panels documentation and tutorials, but I am stuck.
I have one panel which has two columns:
col1: list of node titles based on taxonomy term col2: list of node details based on taxonomy term
When someone clicks on a node title or on a link in the node details, I want them to see another panel for the node, but in my case, this needs to be a node override.
I have made the node override just fine with /node/% and it shows a panel just fine.
Where I am stuck, is how to pass to the node override a second argument, so that I can still show a filtered list of node titles based on the taxonomy term of the node that was clicked.
so, what my panel needs to show when node/% is clicked is:
col1: list of ALL node titles based on taxonomy term of SELECTED node ID col2: the node view of just the current node ID
I "think" I have to do something with the context setting, but the example I read on: http://drupal.org/node/213733 doesn't seem to be relevant to this task.
I'm using Drupal 6 with panels 2 and the latest Views version.
Any guidance for which settings I need to change where would be really appreciated.
Thank you so much for your help!!
Sebastian.
-- [ Drupal support list | http://lists.drupal.org/ ] -- [ Drupal support list | http://lists.drupal.org/ ]
Ok, I found a solution! :D
First I added some invisible fields BEFORE the title field, so that I could reference the NID and TAXONOMY term.
Then instead of checking the box 'link field to node' I instead checked the box: "re-write output of the field' and wrote in the text field:
<h2><a href="?q=product/[nid]/[name]">[title]</a></h2>
Made sure my panel was called:
path = product
And then loaded the left and right panel views for the appropriate content and voila, node view + context relevant taxonomy loaded listing in the nav menu... PHEW!
Hopefully this solution will help someone else in the future.
I'd love to see something like this in the tutorials of Panels 2 because there are many pitfalls; I lost several hours just wondering why arguments weren't being passed only to find out I was loading the View:Default instead of the View:Panel into the Panel->Layout... doh! Would be nice if the Panels didn't even ALLOW you to load the Default so that you are forced to make the RIGHT operation and make panel views for all Views you want in panels... there are so many places to turn arguments on/off and select different ways to read them, that its overly complex trying to figure out where the combination of settings wasn't working... anyways, just my 2-cents :P :)
Sebastian.
Pierre Rineau wrote:
With views 2, you can always put a small snippet of PHP code for argument fetching.
May the panel module allow the same thing?
A small snippet in a textarea could be better than a custom module sometime :)
Le jeudi 16 avril 2009 à 11:31 -0700, Metzler, David a écrit :
Short answer: I don't think this can be done without a custom module.
Longer answer: Panels doesn't allow you to override the links presented by the content, so there's no way to pass a parameter as an argument on the url. You might be able to get away with, so unless views 2 (which I haven't worked with) allows you to overide the link url on a node, you won't be able to pass the argument. I think you'll need to write a module to save away the last term selected in a session variable so that you don't have to rely on it in the url. You would then have to write a context parameter hook in the module to make this avialable via panels. If anyone else has a clearer idea of how to do this, I'd love to hear it.
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of sebastian Sent: Thursday, April 16, 2009 9:36 AM To: support@drupal.org Subject: [support] help with panels, node overrides and context
Hello folks,
Gotten further in my project, but now I feel like I have painted myself into a corner, and I hope someone can point me in the right direction.
I've looked through all the panels documentation and tutorials, but I am stuck.
I have one panel which has two columns:
col1: list of node titles based on taxonomy term col2: list of node details based on taxonomy term
When someone clicks on a node title or on a link in the node details, I want them to see another panel for the node, but in my case, this needs to be a node override.
I have made the node override just fine with /node/% and it shows a panel just fine.
Where I am stuck, is how to pass to the node override a second argument, so that I can still show a filtered list of node titles based on the taxonomy term of the node that was clicked.
so, what my panel needs to show when node/% is clicked is:
col1: list of ALL node titles based on taxonomy term of SELECTED node ID col2: the node view of just the current node ID
I "think" I have to do something with the context setting, but the example I read on: http://drupal.org/node/213733 doesn't seem to be relevant to this task.
I'm using Drupal 6 with panels 2 and the latest Views version.
Any guidance for which settings I need to change where would be really appreciated.
Thank you so much for your help!!
Sebastian.
-- [ Drupal support list | http://lists.drupal.org/ ] -- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]