« Creating a UMBS Trails, roads and basemap | Main | Panels + Views with Filters (search bar) »

July 15, 2010

Panels + Views with Arguments

I've found that passing arguments from Panels to Views via the Default or Page view type to be very simple. Passing the same arguments to a Content Panel is not nearly as easy though. Here's what I've figured out:

Helpful Links:
This comment is a solution although it bypasses Panels arguments altogether so it's a bit of a workaround.

Settings for Views:
Arguments > Node:NID (No Relationships, Hide View if no Argument)
Pane Settings > Argument Input
- Node:NID Source > From Context
- Required Context > Node ID

Settings for Panels:
Add the Content Pane to the Panel (Add Content > Views Panes)
Settings > Node: Node ID > Node Being Viewed

Note that I'm working with the Node Template panel which means a context is predefined. If you're working with a different panel you may need to define a context.

Posted by kkwaiser at July 15, 2010 10:57 AM


Login to leave a comment. Create a new account.