Hello,
I am setting up an online store using Ubercart and have created a hierarchical taxonomy that contains the Catalog category terms similar to the following:
Men
--Tees
--Pants & Shorts
--etc.
Women
--Tees
--Dresses & Skirts
--etc.
Accessories
Music
Art
I am using the Taxonomy Menu module to generate a menu from the above vocabulary and make it required for product node types. I then have a View (products) with a Page Display setup to retrieve various fields (Image, title, price etc.) and have set the path of the view to "taxonomy/term/%" with the "Taxonomy: Term ID (with depth)" and "Taxonomy: Term ID depth modifier" arguments.
This works great as long as all products are created equal but in my case, apparel products are different than music or art products and therefore have different imagecache preset sizes and various CCK fields. I have setup new node types (product classes in UC) for the different types of products and would like to theme them differently such as different grid column count values etc.
My problem is how can I differentiate between the various product types as far as Views is concerned? Since the incoming path from the menu will always be based on "taxonomy/term/%", how can I have multiple views for the different product node types. The system URL for the menu item Men->Tees would use something like "taxonomy/term/20" and Music may be something like "taxonomy/term/26" so no matter what menu item is selected, my product View associated with the path "taxonomy/term/%" will be invoked.
Would I need to create different views such as "apparel_view", "music_view" and "art_view" filtered by node type with a taxonomy term argument and then manually edit each menu item to use the appropriate path? I was trying to avoid this by having Taxonomy Menu generate the menu automatically making it easier to add new categories and subcategories to the site without also having to manually create the menus.
It would be nice to continue to use the Taxonomy Menu module to generate the menu and continue using the term paths as they are but it may not be possible with what I am trying to do.
In any case, I'm confused about how to accomplish this and any help would be most appreciated.
Thanks
Comments
Confusion with Multiple Node Types, Views and Taxonomy Terms
Hi,
I have a similar problem. One of my vocabularies is:
Pinboard
- Category 1
- - Selling
- - Buying
- Category 2
- - Selling
- - Buying
- Category 3
- - Selling
- - Buying
I have different node types for selling and buying - "selling" contains pictures.
In your case the designed version 3 of Taxonomy Menu might be a solution.
See: http://drupal.org/node/432048
It will offer the possibility to have multiple Menu Groups per Vocabulary. For each Menu Group one can have an own url-path when using the option custom path. For each path one can set up a different view like clothes/%, art/%, music/% ...
I will also be possible to link each Menu Group to any excisting menu item.
I you have any suggestions how this problem could be solved from the side of Taxonomy Menu please post an issues there.
Klaus
Solved!
Thanks for the input Klaus.
I was actually able to achieve exactly what I was looking for by using the Taxonomy Redirect module.
I have Taxonomy Menu setup to use the default path which is "taxonomy/term/tid" and then use the Taxonomy Redirect module to create redirects to a custom taxonomy path such as "apparel/!tid", "music/!tid" and "art/!tid". The site is still a work in progress but you can see it on my sub-domain here. There's only a few dummy products in there for testing purposes but you can look under "Men->Denim" and see a view that shows some apparel products with a certain size image etc. Then if you select "Music" you will see a view of music products that use a different image.
Then I have views that use these paths. One view for apparel products that picks up the redirected taxonomy path "apparel/%" and another view with the path "music/%" and so on, each with their own fields particular to that product. I then theme them accordingly.
I believe that you should be able to use Taxonomy Redirect to redirect the paths for your "Selling" categories and "Buying" categories the same way.
Good luck and thanks again,
Jason