Jump to:
| Project: | Panels |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
I set up a view with a panel pane to be used in a panel page in a users page tab. I want it to use the URL argument of the UID to display only content from that user (/user/1/my-portfolio). Instead it's showing all the content from everybody.
In the view panel pane, I have the User: Uid set in Arguments, the Argument input: UID source: From panel argument.
In the panel setting, the URL is user/%/my-portfolio, the Argument settings is %0 position 1 assigned to User ID. In the panel content, the panel pane is set to use the User ID context, and Send arguments is checked. If I test it in the panel preview it works correctly. The same goes if I preview it in the views section.
I did have this all working under panels 2, but I switched over when I read that panels 3 is the way to go on a new setup. I attached copies of the panel, and view exports here.
I hope it's just something I'm missing. Thanks.
| Attachment | Size |
|---|---|
| panel-portfolio.txt | 4.38 KB |
| view-portfolio.txt | 11.42 KB |
Comments
#1
Funny, I've been having the opposite problem. When I try to use the option to pull it from context it doesn't work. Using the "from panel argument" option works perfectly. But, of course, that makes it less portable. I'd prefer to have it working from context.
Michelle
#2
I actually tried all the argument combination's and none of them worked for me.
#3
I got it working, and it wasn't a panels problem!
I configured the view in panels content to use the User:UID context set to User ID, and checked Send arguments.
In the view settings, under Arguments>User: UID was where the mistake was. This is the way it does work:
Action to take if argument is not present: -> 'Provide default argument'
Default argument type: -> 'User ID from URL'
Validator: -> User
Type of user argument to allow: -> Only allow numeric UIDs (that's just how mine works).
The rest of the setting are set however you want it to look like. I hope this helps someone else sometime. See, it wasn't a panels problem after all. Thanks for the excellent module.
#4
Hm. That's not the same thing, though, that doesn't actually take the argument from Panels. I'll have to delve into this and see if I can figure out what's wrong. There are too many reports of this not working to just be a fluke somewhere, though my tests have all been functional. =(
#5
wxman: Ok, you're running into two separate problems.
1) Your content pane config isn't being used because you're using the 'all views' version of the view. This can be a little bit tricky, unfortunately. But if all views are available, there are actually TWO ways to put the view into the panel. The way you used puts all of the settings into the pane, rather than using the ones on the view. If you look in the 'Views panes' section, that version of the view would have pulled the argument 'from panel argument'.
2) The reason the setup you actually used wasn't working was this bug: http://drupal.org/node/451078
#6
So I should set "Choose the data source for view arguments" to UID source From panel argument? That's what I have set now, and it's working.
#7
+1 for wxman
#8
Automatically closed -- issue fixed for 2 weeks with no activity.