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

CommentFileSizeAuthor
#12 viewarguments.jpg54.77 KBsummit

Comments

summit’s picture

Hi,
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

Arguments:  "Additional arguments to send to the view as if they were part of the URL in the form of arg1/arg2/arg3."

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

merlinofchaos’s picture

I 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.

summit’s picture

HI,

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

merlinofchaos’s picture

hmm. 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.

summit’s picture

Hi 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

summit’s picture

Hi 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

merlinofchaos’s picture

Hey, 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.

summit’s picture

Great!
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

merlinofchaos’s picture

This should be fixed properly in alpha5.

summit’s picture

Hi Earl,

I am looking forward to this!
Thanks in advance.

greetings,
Martijn
www.gratis-informatie.nl

merlinofchaos’s picture

Status: Active » Fixed
summit’s picture

Status: Fixed » Active
StatusFileSize
new54.77 KB

Hi 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

merlinofchaos’s picture

IF 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.

summit’s picture

Hi 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?

merlinofchaos’s picture

%1 = TestPanelTerm
%2 = Frankrijk
%3 = Espace-Killy

Absolute just means it doesn't change.

summit’s picture

Hi,

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

summit’s picture

Version: 5.x-2.0-alpha4 » 5.x-2.0-alpha5

Hi,

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

summit’s picture

Earl,

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

merlinofchaos’s picture

Status: Active » Fixed

I think this will be fixed in alpha8.

Anonymous’s picture

Status: Fixed » Closed (fixed)
socialnicheguru’s picture

good 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).