6

I want to create different view pages for different vocabulary types.

For each vocabulary I created a view and assigned a filter to limit to one vocabulary; as a page path I'm using taxonomy/term/% (on every view). It seems like only one view is working. For all others no details displayed (just an empty page is showing up).

Is this a valid approach? What can I do to display different taxonomy term pages for each vocabulary?

Also, the solution tvi doesn't work.

4

The best solution that I have been is the Taxonomy Display module. It Can handle each view, no matter its URL! it's very powerful!

The taxonomy display module allows administrative configurable term display pages. This allows administrators to override the default presentation of taxonomy term pages per vocabulary through the taxonomy term page's manage display form.

  • This module is for Drupal 7.x only. – Jekis Jun 4 '13 at 11:39
2

Panels: enable prepared taxonomy term page, clone it for each your required vocabulary and add "Selection rules" for these.

2

Use Taxonomy Views Integrator module:

How do you use it:

  1. Enable TVI module (requires taxonomy and views)
  2. Set permissions regarding TVI administration
  3. [optional] Define a new view, clone taxonomy/term/* view, or you may use a view from code.
  4. After you know what view you want to use on a vocab or term, simply visit the term or vocabulary edit page that the view should be applied to, select the view that you wish to use using the drop-down select list, select the view plugin, and save your changes.
1

You can create special template taxonomy-term.tpl per each vocabulary. You can specify the vocabulary here.

vocabulary-[vocabulary-name]: The vocabulary to which the term belongs to. For example, if the term is a "Tag" it would result in "vocabulary-tag".

0

You can create separate template file for specific vocabulary, For vocabulary of term 2 you can create tpl file like

page--taxonomy-vocabulary-2.tpl.php

And in template.php file you have to add following code:

if (arg(0) == 'taxonomy' && arg(1) == 'term') {
  $term = taxonomy_term_load(arg(2));
  $vars['theme_hook_suggestions'][] = 'page__taxonomy_vocabulary_' . $term->vid;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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