4
votes

Is it possible to disable the normal taxonomy listing of nodes on taxonomy term pages?

The reason I need this is I want to use a view's override of taxonomy pages BUT the default views override stops a breadcrumb module working properly. So, I want to make a term view but as a block and show it on certain pages with PHP.

Thanks

4
This probably isnt the cleanest way but ive made a page-taxonomy.tpl.php and removed this:<?php print $content; ?> So far it seems this solution will work for my site, but id still like to know the proper way to do it.Evanss

4 Answers

0
votes

If all you want to do is override the taxonomy term pages with a View, but NOT use the default view, you could create a custom module implementing hook_menu() or you could also take a look at the Taxonomy Redirect module.

From the Taxonomy Redirect page:

This module allows the administrator to change the destination of Taxonomy Term links.

7
votes

Another way of doing this is using the Display Suite and Taxonomy Display module. Install them, then go to admin/structure/taxonomy/[mytaxonomy]/display.

Under "Use custom display settings for the following view modes" select "Taxonomy term page".

Then, in the "Taxonomy term page" view mode, under Term page display, select "Associated content display": HIDDEN.

Done! :)

6
votes

This module claims to do just what you are seeking, but it did not seem to work despite checking the correct taxonomy to disable:

http://drupal.org/project/disable_term_node_listings

But putting the following in your theme's template.php will suppress those node listings:

function MY_THEME_preprocess_page(&$variables) {
  if(arg(0) == "taxonomy" && arg(1) == "term") {
    $variables['page']['content']['system_main']['nodes'] = null;
  }
}

It's sort of a dirty way to do it, and you'll have to hide the pager using CSS, but it works.

1
votes

This probably isn't the cleanest way but I've made a page-taxonomy.tpl.php and removed this:<?php print $content; ?> So far it seems this solution will work for my site, but I'd still like to know the proper way to do it.