Posted by amir simantov on August 4, 2010 at 4:00pm
I have a pane holding a specific node. This node needs to get an argument (an arbitrary string). I cannot find a way to pass the string from the panel page to the pane.
Any help will be appreciated, thanks!

Comments
Use arg()
You can use arg and pass string /node/232/yourstringhere/morestringshere
Which will be retrieved with arg(2) and arg(3).
Where and how?
Thanks Alexei for the fast comment, but I do not understand how can I use your advice. I am using the standard Panels' interface (latest version) and not doing it by code. So where should i use arg()? Could you or anybody explain where to do it in the Panels' interface (which tab, what field, what value...). Thanks once again.
Well, nodes don't receive
Well, nodes don't receive string arguments normally, so getting a string to a node is a little difficult. I think you need to describe more about what this string is for.
The only 'argument' that node content panes receive from Panels is the node itself.
Not in code?
@ Merliofchaos: I stand corrected - that is just a fast and easy way that I use when there is a certain easy argument to pass. Hey would like to take a sec to say thanks you for writing views and CT! It's adorable!
@ Amir: The reason why you pass an argument is to use it in code. Say, you want to pass a node id of a hotel you want to rent to a request form or something like this. Otherwise it is unclear. Usual nodes dont take an argument. Views do, custom code snippets, etc.
Here is the full scenario
Thanks Earl and Alexei. I will describe the situation.
There is a webform with a hidden field. This hidden field gets the value entered as an argument to the webform address. This is for tracking refers to the webform which are part of a mini affiliate program I am building for selling a product. This works fine.
Now, I have built a panels page with 2 columns - one of them holds the webform node. I need that this webform will get the value of the argument just as it gets it when standing alone, not within a paenls pane.
Actually, this whole structure serve as a a very rich landing page, because the other columns (not the one with the webform node) has quicktabs with much more info.
I hope this is more informative now. If there is an alternative way to accomplish the task - I will be glad to know about it.
Thanks,
Amir
Since webform doesn't have
Since webform doesn't have any particular Panels integration that I know of, the method it uses to get the string probably has to be the same.
Where does webform get this string? Is it normally from the URL? i.e, you visit node/1/foo and webform uses that 'foo'? Or does it come from elsewhere?
Well, I am following the
Well, I am following the quite canonical use of the hidden fields with default values - using %get[KEY] - as explained in the webform book: http://drupal.org/node/296453
When I use it like this: example.com/node/6?r=John
... assuming r is the name of the hidden field,
I need to find a way to propagate this miserable fellow through the panels page...
Then you'll have to find some
Then you'll have to find some way to set $_GET['r'] = 'john'. Typically this is supposed to be in the URL, and webform should just use that, whether or not Panels is involved.
My difficulry is not with webform
but with Panels - how do I PASS this $_GET['r'] so the webform inside the pane can it?
See, this is where you're
See, this is where you're incorrect. Your difficulty is with webform.
Webform is not Panels aware. That means Panels cannot pass it anything.
I see now... It works "the other way 'round"...
So, what can I do? Any hook to be used? Any... Anything?
Thanks again Earl.
P.S. Waiting for you Addison-Wesley book.
Then you'll have to find some
i.e: Don't ask me. I can't help you get information to another application. You have to use whatever that application accepts.
Thanks a lot Earl
I will do my best and will submit here the solution once reached.
Amir
[Edit] - Added an issue in webform module -http://drupal.org/node/876892
Mission accomplished
Actually, it seems that there was no problem in the first place. I have probably tried to use clean URL syntax and THIS failed. However, if the URL is example.com/my-panelpage?q=123 the value do propagate down the panel to the webform. If there is a way to use it with clean URL syntax it is preferred but not a must.
Thanks once again,
Amir