1

I ran into a little problem today, I have a specific panel for all my products. This panel contains out of a 3 column layout.

One of those columns contains a list of all other products in the same category. (which is a view).

When I created the view, I added a contextual filter to only display products out of the category that was send. (Categories are nodes and linked by a node reference) (This is just to allow the client to easily add and remove categories so he doesn't have to use the build in taxonomy)

I noticed however that I can only use the node id of the category to filter.

The problem is that the Panel only sends the string to the View, so the filter doesn't work. Is there a way to get the node id of the linked category?

2

General solution:

  1. Your View should have a "Content pane" display
  2. Your pane should be configured to require an argument that matches the one your contextual filter wants.
  3. Add the pane to your page.

For your specific question, I don't understand how you pass a string at all to Views, so I need more info about your setup to be more specific.

  • My view is just a "Block", I don't see any option to turn this into a "Content pane". The view is setup so that it requires an argument. This is the view setup: dl.dropbox.com/u/274185/… And the Panel: dl.dropbox.com/u/274185/… – woutr_be Feb 14 '12 at 2:17
  • You need to enable the "Views content pane" module, which is a part of Ctools. I don't think what you are trying to do is possible with just "blocks" as they are unable to read contexts. – Letharion Feb 14 '12 at 9:10
  • I have "Views content pane" enabled, but I don't see any option under "Views" to create one of those. – woutr_be Feb 14 '12 at 11:05

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.