I plan to have a panel page with two regions:
- on left, a panel of one author
- on right, a view of all the stories written by that author.

I don't yet know how the user arrives at this page (my understanding of panels is still in its infancy).

Does the right panel get its argument from the left panel? Or somewhere else?

If the left panel node has Node ID 62, does the view (right panel) need to be sorted in node ID order (with a contextual filter)?


It gets its context from the Contexts that you load into the Page on the Page Manager part of the dialog. It looks like this:

enter image description here

In this case I started to override the node view page, so it comes with the initial context of the node (nid, date published etc).

I then added a relationship on that same page of User to bring in the related Author's User data. After I saved it brought that context in for me and it looks like this:

enter image description here

Note the User from Node part.

I can continue to bring in context connected to the node, or now also connected to the user.

To embed a view in a Panels pane you need to first install Views content panes which is part of CTools. You then add a Content Pane via the Views UI to the view. You set the Contextual argument and in ADDITION you need to click on argument input (middle part of the Views UI) to tell the view where the context is coming from. This dialog will then bring up your contextual argument that you added, and a selection for you to specify where or what to get the context from. For the most part you will select From Context and for a node select Node, Content id. Now back in your Panels UI you can add a view as content. You select View panes (though this is just a default that is specified on the view itself and you can alter it per view), select your view, and it will pick up the contextual filter and the type of context you specified for it, and automatically make a selection of contexts that match that you have enabled in Page Manager.

So in order to decide what panel needs what context (or arguments) you need to first establish how the content in the specific panel is related to the type of page your are creating a variant for. I your case of author and stories, you can start with a user page and you want to end with stories on that user page written by the user. Your initial context will be User. No need to bring in extra context as your view for the right panel will take a uid contextual filter. Your right panel will embed a Views content pane with a contextual argument of uid that you connect as the author of the nodes. You will specify in that view that you want the argument input to be of User type from Context, and in your panel, when you add the content pane it will allow you to link it to the user context that is available.

  • Thanks. I have Chaos tools. I see the ability to add Content pane from the View, but I have no idea what to do with it! I see the Argument input. I'll study what you've written for a bit. Truly, I'm very grateful that you've taken the time to point me in the right direction. :)
    – TdeV
    Apr 28 '16 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.