There are cases that there is only one node displayed and still have "refine by ... " blocks displayed
GiorgosK - April 2, 2007 - 00:37
| Project: | Refine by taxonomy |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
Its not a bug per se, but its not logical to refine a list of ONE node
I think if it is possible to check whether the list of nodes to be displayed is equal to 1 the refine blocks should not be displayed at all.

#1
+1 ... subscribing
#2
I don't know how to patch this but I know how to hack it
function refine_by_taxo_block($op, $delta = 'and_node', $edit = array()) {global $pager_total_items; //line 8
switch ($op) {
case 'list':
return refine_by_taxo_list_blocks();
case 'view':
if (refine_by_taxo_page_is_term_list() && $pager_total_items[0] != "1") { //no sense to run all the code if nothing can be found anyway.
//line 14
added line 8
modified line 13 by {adding && $pager_total_items[0] != "1"} in the if conditionional statement
everything else is the same
don't know if this the "correct" drupal way but it works
#3
would be very cool to get it official implanted in the modul.