Let's say I build a view at URL "myview" and give it a term ID argument.

Now, in views' argument's "Default" setting, I can choose "display all values". This will allow me to show all nodes at myview when it has no arguments.

ie
myview/5 will show me all nodes assigned to term ID 5.
myview will show me all nodes regardless of their term ID.

Perhaps I am misunderstanding something from Panels, but I have run into this problem numerous times now with panels 2... let's say I want to create a panel which contains amongst other things a view listing all news articles of a certain term ID.

A panel at news/% with a term ID context works beautifully. However, I can't get just "news" to provide a list of ALL the news. The view can do it, but the panel tells the view that its required context of "term ID" is not available, and hides the view.

I believe a third option in the panel's context argument popup would solve this issue. If we could tell the panel to "display all values" when no term is supplied, I think everything would work.

Since in the case of a term ID context you can select the vocabs you want the panel to handle, I think a "display all values" would need to pass through all the terms within the vocabs selected.

Comments

sdboyer’s picture

Assigned: Unassigned » sdboyer

Yeah, this is definitely a very real issue. Problem is, there are circumstances where a 'Display All Values' option doesn't make any sense - as far as I can think, it depends on the type of context we're using. I'd love a patch on this, but realistically, I think it's going to be one the panels devs will have to deal with (just because it takes you pretty deep into the API).

sun’s picture

subscribing

In our current project, we also had to struggle with empty contexts that should still display "something" albeit no valid context was passed in.

frankcarey’s picture

yes, I'd like to have a "default" display for a panel for no arguments, and then a different display for when you do have one. the better way to describe the displays the way panel api looks at them might be "empty" and "default" . I'm looking at the API and http://drupal.org/project/panels_plugin_example (wish i found this example module a lot earlier). So I'm already pretty deep into the API (writing a module to do location module args and contexts), but how to create an empty display iss till beyond me. Any help?

frankcarey’s picture

So, I'm thinking i would add this to the display options?

frankcarey’s picture

OK, so I've coded this into my module (An empty/bad arg display option) but the display subtabs only show up in the context tab when i use an argument wildcard in the path (mypanel/%) if I leave the wildcard out (mypanel), I can still add arguments, but the additional displays don't show up. Any idea why?

Thanks
Frank

frankcarey’s picture

This is the help text. I makes me think that you don't need to use a place holder for any argument after the url, like foo in this case:

"These arguments are parsed in the order received, and you may use % in your URL to hold the place of an object; the rest of the arguments will come after the URL. For example, if the URL is node/%/panel and your user visits node/1/panel/foo, the first argument will be 1, and the second argument will be foo."

esmerel’s picture

Status: Active » Closed (won't fix)

Significant changes were made to the Panels 3 line, no features will be added to Panels 2.