1

I'm trying to create a simple classifieds area e.g. think of Craiglist.

I have 2 taxonomies; Region and (Ad) Category.

Everything is fairly easy when using just the Category in the following way:

Marketplace (views page)

  • Cars (5)
  • Clothes (10)
  • Electronics (14)
  • etc.

Category (views taxonomy page)

Cars Listing of 5 nodes belonging to this category

Now, I want to bring along the Region but I am stuck on how to make it work with the listings I have. The user should be able to choose the Region before coming into the Marketplace or when on the Marketplace page. The number of items in each category would reflect on the chosen Region and consequently the Category pages would list only nodes that are in that Region.

What I've tried is to use the Views exposed filters and it works fine on some parts. The real problem is how to make it all flow from the beginning so that the Region information carries across the steps?

1
  • Have you looked at the FacetAPI? It may be the solution May 31, 2016 at 13:05

1 Answer 1

1

For this case, exposed filters are the wrong approach.

You can do this by making a contextual filter that operates on your region vocabulary.

Assuming your view is set to display taxonomy terms, I would do the basic configuration like this:

  1. Add a contextual filter of type Taxonomy term: Term ID.
  2. Set When the filter value is not available to Display a summary.

When you do this, you should get a page that list the regions if you have not selected one yet but lists data if you have selected a region.

2
  • This is not working for me. When I add the filter there are no results when using an argument.
    – user13194
    Feb 4, 2013 at 3:44
  • Where is the view being displayed/what does the path look like? Feb 4, 2013 at 5:05

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.