0


I need some help with the taxonomy view.
How can I create many views for many terms ?
I want that many terms from different taxonomies terms point to different views or at least to different structures of the same view.
The problem is that drupal translate each link of all taxonomy term to the model taxonomy/term/% that makes that all taxonomy term point to the same view. and I want that each taxonomy term point to a different views.
I hope i expressed myself well !
Thank you very much!

5
  • I suggested to create different views or page display for each term. If this is inappropriate for some reason (due to e.g. number of terms), you need to describe the factors that are involved in selecting the right view for a particular term.
    – Oswald
    Mar 19, 2012 at 19:46
  • "you need to describe the factors that are involved in selecting the right view for a particular term" I didn't understand what it means. can you express yourself more? Mar 19, 2012 at 19:53
  • How do you decide, which view to use for a given term? Based on the vocabulary? Based on remainder of division of the tid by 3 (just kidding)? Based on the current phase of the moon (kidding again)? If you can establish a rule for selecting a view, you do not need to create separate page displays for each term. But we need to know this rule to be more helpful.
    – Oswald
    Mar 19, 2012 at 20:11
  • lol :-) I have 2 vocabularies. "gallery" and "artist" each gallery has works(of many artist) and each artist has his works. I want that when I click on the specified gallery I get all the works in this gallery(specified fields of the works) and when i click on the artist i get all his works(other field of the work) Mar 19, 2012 at 20:22
  • Intuitively, I would use the same path taxonomy/term/% for both views and configure the argument validators differently (contextual filter in recent versions of Views). But this does not work. So I looked for a module that can do this. See my updated answer for details.
    – Oswald
    Mar 19, 2012 at 20:39

2 Answers 2

0

Create a view with a page display that has a Drupal path of e.g. taxonomy/term/5. This page display will then only be used for the term with the tid 5. Create other views or page displays for the other terms.

If you want separate views based on the vocabulary that the term belongs to, have a look at the Taxonomy Views Integration module.

2
  • I like that even more! Easier to manage and administer Mar 19, 2012 at 19:44
  • Ok but if want the same view for many terms (15) and the others view for many terms(100) ?? Mar 19, 2012 at 19:52
0

The way I would go would be to first create the desired views, then create custom "page–taxonomy–term–[tid].tpl.php" files, and in their code use the views_embed_view invoking the desire per-page view. I'm not sure though if this is the most effective way.

Your Answer

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

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