Hi,
I have installed panels 5.x-2..0-alpha4.
It seems to me that the arguments are not taken from the views anymore.
Am I correct are others also experiencing this?
With panels you can select [Send arguments] and fill in additional arguments. I presume %0, %1, %2, etc.. like in the Panels 1.0?
If I fill in %2 should than only with url www.test.com/foo/bee/naa only 'naa' be used as variable in the view?
The arguments work in a view for me, but when I embed the view in a panel, the arguments are not working anymore.
Greetings,
Martijn
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | viewarguments.jpg | 54.77 KB | summit |
Comments
Comment #1
summit commentedHi,
I am sorry for last post. I think it was a cache thing..
But I still have a question about the arguments.
When I type %2 in the field
Nothing happens.
Is the arguments: %0, %1 or %2 or %3 working?
With http://www.test.com/foo/bee/naa
Is it possible to get the %1 argument in one view populated and the %2 in another view?
So in one panel one view-block uses "bee" and another view-block uses "naa"?
greetings,
martjin
Comment #2
merlinofchaos commentedI changed the argument handling so that it's a little more straight forward. The arguments to the panel are passed through if you check the box; I don't thihnk it'll read %1/%2/%3 anymore, though, so if you need something that is part of your URL you'll need to do it manually.
For example:
If my panel url is: foo/bar
And I visit the page 'foo/bar/baz' which gets to my panel, 'baz' will be sent as an argument. If I want Views to get 'bar' as an argument, I'd have to put that in as an additional argument.
Comment #3
summit commentedHI,
It would be great to be able to set the arguments per view in a panel.
So yes if you would like to consider making it possible to be able, in your example to send "bar" as an argument.
But also be able as a %2 argument like foo/bar/baz/naa "naa" as a argument?
Or maybe %3 for foo/bar/baz/naa/koo "koo" as an argument.
In my example %2 and %3 would be terms.
With this feature we can then use a panel with one url and be able to use the same view-block with different arguments.
It makes the whole system much more flexible!
greetings,
Martijn
Comment #4
merlinofchaos commentedhmm. I guess I can return the %X behavior; I didn't think it'd really be needed, but I guess there are some rare edge cases where it's still necessary.
Comment #5
summit commentedHi Earl,
Am I understanding it correctly that in the alpha4 version you have to set the argument for the view "hardcoded"?
Lets take an example. I would like to have the panel url like: www.test.com/area/france/paris.
The panel name and url will be area.
The argument 1 for the view (arg(1)) is france and the argument 2 (arg(2)) is paris.
If I want paris to be recognized by the panel and placed in the view, should I hardcode type in paris in the panel-view-block?
And if I want this panel to be a sort of template for all my terms in france; say france/nice , franse/montpelier should I make different panels or view-blocks in panels for this.
Or can I type in a variable like arg2 in the additional argument field?
Sorry if this documentation is allready somewhere to be found.
greetings,
Martijn
Comment #6
summit commentedHi Earl,
As I type, I see your reply, thanks!
If you could get in the %X behaviour so that related to what is typed in in the argument field: %1, %2 or %1/%2 the specific part of the url www.test.com/foo/bar foo as %1 and bar for %2 can be send to the view.
With this behaviour we can use the same view, but because of the different arguments we could let the same view show different results.
In my example taxonomy term france will give my weblinks france, but the taxonomy term paris will give only the weblinks related to the taxonomy term paris.
Could this be possible?
greetings,
Martijn
Comment #7
merlinofchaos commentedHey, I'm wrong! The code for the %X replacement is still in there.
But it's broken. So I will have to fix this for the next alpha release.
Comment #8
summit commentedGreat!
Please make it so that you can type in %1 for the first argument after the panel url: foo/bar
And %2 for the second argument, so that in a view the argument %1 is sometimes used (because two terms are not working correct with views) and sometimes %2 can be used.
For example the www.test.com/France/Paris url
The view-block will give then different results depending on the argument, so then
view-block France | view-block Paris
This with working with the same view-block, but only in the first putting %1 in the argument and in the second putting %2 in the argumentfield.
Hpopefully this is doable.
Thanks in advance,
greetings,
Martijn
Comment #9
merlinofchaos commentedThis should be fixed properly in alpha5.
Comment #10
summit commentedHi Earl,
I am looking forward to this!
Thanks in advance.
greetings,
Martijn
www.gratis-informatie.nl
Comment #11
merlinofchaos commentedComment #12
summit commentedHi Earl,
It looks like it is not yet fixed, sorry..
I have a screenshot of 2 panel-panes. The panes are both filled with a view based on terms. A clone of taxonomy/term.
The first view has %1 as argument, the second has %2 as argument.
The panel pane arguments are also set as for the first %1 and for the second %2.
It seems to me that when the url is www.test.com/foo/baa/naa with foo being the panel-url.
The first panel-pane (with view) should use the %1 "baa" term
The second panel-pane (with view) should use %2 "naa" term.
But both panel-panes report the same results..
only the "baa" term is transported from panel to view. The %2 argument is ignored.
Can I be correct that the %1 and%2 code is not yet working?
Maybe it is also a view thing with the %2 argument.
Greetings,
Martijn
Comment #13
merlinofchaos commentedIF your URL is foo/bar/baz
Then %1 == foo
%2 == bar
%3 == baz
The values are NOT relative to the specified URL, they are absolute.
Comment #14
summit commentedHi Earl,
Are you saying that I should read it as this:
http://www.test.com/TestPanelTerm/Frankrijk/Espace-Killy
Then
%1 = TestPanelTerm
%2 = Frankrijk
%3 = Espace-Killy
Or is it than
%1 = www.test.com
%2 = TestPanelTerm
%3 = Frankijk
%4 = Espace-Killy
What do you mean by it's absolute, not relative please?
Comment #15
merlinofchaos commented%1 = TestPanelTerm
%2 = Frankrijk
%3 = Espace-Killy
Absolute just means it doesn't change.
Comment #16
summit commentedHi,
So does it mean I have to put "Frankrijk" in the argument-field in the panel pane and "Espace-Killy" in the other one?
Or should it be sufficient to put %2 and %3 and the url says which argument needs to be transported to the view and therefore shown?
I hope the second option, because then instead of /Frankrijk/Espace-Killy also /Frankrijk/La-Plagne can be shown using the same panel.
Greetings,
Martijn
Comment #17
summit commentedHi,
I build the views using %2 and %3 in the titles.
I build the panel-panes with %2 in one and %3 in the other.
I tried using http://www.test.com/TestPanelTerm/Frankrijk/Espace-Killy or
http://www.test.com/TestPanelTerm/Frankrijk/La-Plagne
Both panel-panes only gives results containing the argument "Frankrijk"
The %3 argument "Espace-Killy" or "La-Plagne" is not transported to the view with the %3 argument.
Only the %2 argument looks like being used to be transported to the view.
Greetings,
Martijn
Comment #18
summit commentedEarl,
Is this view issue: http://drupal.org/node/77543 (two terms one one view).
maybe related to my problem that %2 and %3 on panels are not working?
Again thanks for your reply.
greetings,
Martijn
Comment #19
merlinofchaos commentedI think this will be fixed in alpha8.
Comment #20
(not verified) commentedComment #21
socialnicheguru commentedgood explanation of arguments to the panel page.
I think that concrete examples like above should go into the documentation. http://drupal.org/node/153582#comment-572252
I thought that the placement of arguments for panels was like that for views. In a view the first argument is at the zero index. http://myseite.com/foo/bar
foo is usually referred to as arg(0).