1

I would like to build a view (slideshow) of profiles, which is relatively easy to do. However I would like to filter them based on a node field of the page the view will be displayed on. I defined a new content type called Category, where I describe categories in more detail. One of the node fields is called category.

My profiles also have a field category. The idea is that when a user views the node Category A, I would like to display a view showing all the profiles belonging to Category A. When the view Category B, I would like to display all the profiles belonging to Category B.

Can this be done via Contextual Filters? If so, how?

I'm not sure if this helps but the Category values are stored in Taxonomy.

3

2 Answers 2

0
  1. Add contextual filter on term id
  2. select Provide default value
  3. select type content id from url
  4. also change your path to [your_path]/%
1
  • Thanks but this works on page views, but not on block views. Commented Apr 24, 2014 at 10:38
0

Sorry for the confusion with the comments above. So hopefully the system will accept this as the answer:

In summary make sure you following all steps provided in the answer including:

  1. Under "When the filter value IS in the URL or a default is provided" check "Specify Validation criteria"
  2. Select the vocabulary being used.
  3. Under "Filter Value type" pick term name converted to term ID"
  4. Checking "Transform dashes in URL to spaces in term name filter values" will insure that any auto generated path alias' that have converted spaces to dashes are properly handled. Try your view with this checked and unchecked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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