Community

taxonomy/term/% and multiple displays in a view

hi,

I have a website setup with multiple vocabs which are intended to classify "sound samples", which is a custom content type I created, and I'd like to create different views and different displays for every vocab.

Example :

Vocab 1 : Sounds > bass, lead, string, percussion etc.
Vocab 2 : Synthesizers > Virtual Synths, Hardware Synths etc.
Vocab 3 : Genres > dance, trance, pop, jungle etc.
etc.

I created a view called "sounds" with 2 page displays that have this path set : taxonomy/term/%
Then I added a context filter on the 1st one to display sound samples of Vocab 1 via the validation criteria, then added a context filter to the second display to get the sound samples restricted by genre.

Now when I preview both of them in the admin overlay, I get the correct results, but when I access the different paths (ie domain.com/sounds/lead or domain.com/genres/trance) I get a blank page on the 2nd one and all the correct results on the 1st one.

So I disabled one of the displays, and made the other one to display sound samples from both vocabs (having sounds and genres checked in the validation criteria), and it worked.

What I deduced from this is that only one view or display at a time among the available ones can have "taxonomy/term/%" path set, and it will be automatically used when any taxonomy page is called.

So my question is, what is the correct way to have different pages (with different styles, that is the purpose of this) showing sound samples (or any general content) from many vocabs using Views ?

Thanks in advance.

Comments

How do you want the pages

How do you want the pages different?

I ask because there are different approaches that work for this depending on what you want different.

Ok sorry, it may be confusing

Ok sorry, it may be confusing because I am using the term "page" instead of "layout" when talking about "web page" and not the view display "page" :)

What I am trying to achieve is having 2 different layouts for each of the results I get from the 2 displays I created (which are of type "page").
I also need to have different fields for every one of them, so it's not only a matter of CSS & layout.

I hope it is clear :)

Sorry, it is not at all

Sorry, it is not at all clear

You have two vocabularies and you want the pages for them to be different. Exactly how are they different?

And I am unclear how "I also need to have different fields for every one of them" fits into the question.

---

@hatembr correct me if I'm wrong, but you want to have 2 different views of a taxonomy term (sorting by different criteria), and somehow use the same taxonomy path (taxonomy/term/%) for both.

Obviously you've seen that won't work :)

I would create 2 view pages, and give them each a distinct path. You can set one as the "default" for the taxonomy term, but the second will have to have a different path.

There are creative ways to

There are creative ways to achieve this with the one path, details depend on the differences wanted.

yes, that is exactly what I

yes, that is exactly what I am trying to achieve.

I understand how to use a default taxonomy/term/% as the path for the first vocab. I already did this and it works fine (just cloned the default drupal view and tweaked it).
but as far as setting the other views path go, i still don't get it :)

here is what i've done so far, i have defined my taxonomy patterns like this (config > url aliases > patterns) :

patch-categories/[term:name]
synthesis/[term:name]
synthesizer-types/[term:name]
synthesizers/[term:parent:name]/[term:name]

with that done, if i access my default view, it will work, since every path is interpreted correctly as a taxonomy/term/%

now for the 2nd view i will create, let's say the one that lists nodes filtered by the "synthesis/[term:name]" taxonomy and where i'd like to have different fields in the listing, my questions are :

- do i have to create a totally different view or just another display in the same view ? is that a matter of choice or is there a practical difference ?
- how to set the path of the other views/displays destined to display nodes from the other vocabs since taxonomy/term/% will hook to the default view
- is it possible to combine "taxonomy/term/%" with static words like "synthesis/taxonomy/term/%" or does taxonomy/term/% include the static word "synthesis" i defined in my pattern ?

so many questions i can't find answers to.
thanks

any help please ?

any help please ?

hello , i have the same

hello ,

i have the same problem , i expose my case :

i have two content type : team and product

with two differents vocabularies :
team type >
Board of Directors
Executive Committee
Investment team

product type >
type A
type B
type C

I would like to have two differents view for each content type and using contextual filter taxonomy/term/% in each view but it's not working for my second view

For the first view it's working

it clone this firts view to create a new one (my second view) and setting up a contextual filter taxonomy/term/% , i setting up my theme information to have a different display than the first but its not working

Thank you very much for your help

@hatembr you should try

@hatembr

you should try http://drupal.org/project/tvi (Taxonomy Views Integrator) because i 've try to use it and it resolve my problem

thanks

nobody click here