4

I have a custom field (field_locations ) which lists 20 different locations. I would like to use that field as an argument to obtain a block view that lists similar/related locations.

Any idea on how to construct the argument?

  • You want to use the location field to list similar content in the block or you want to list locations similar to those in the content field? If #2, by what criteria I.e. is the location a simple taxonomy type or a node reference? – kolossus Oct 22 '12 at 18:58

1 Answers1

0

Create a contextual filter for field_locations on your view. Set the filter to provide a default value, using PHP code. In the filter's PHP code, grab and return the value of your field or taxonomy term.

Chris Miller
  • 493
  • 2
  • 10