Option to change path that triggers the module

dthiessen - March 10, 2008 - 16:43
Project:Refine by taxonomy
Version:5.x-0.1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Right now the only path that will trigger the module is "taxonomy/term". I currently use the contrib module taxonomy menu which generates links such as "category/4/5". How hard is it to modify the module to work with the menu links as well as the originals?

Is this the only function that would need to be changed?

function refine_by_taxo_page_is_term_list() {
  if (arg(0) == 'taxonomy' &&
      arg(1) == 'term' &&
      preg_match('/^([0-9]+[+, ]?)+$/', arg(2))) {
        //url starts with taxonomy/term
        //and contains a number, or a 123,1456 type combination.
    return TRUE;
  }
  else {
    return FALSE;
  }
}

#1

dthiessen - March 17, 2008 - 21:17

Still looking for an answer. Do I need to provide more information?

#2

Bèr Kessels - May 1, 2008 - 14:38

That is the function. But instead, we should make this more general and modular. Something like a hook to retrieve taxo information of the current path could be used for modules such as panels and views too.

#3

Summit - September 13, 2008 - 11:10

Subscribing, very interested. Greetings, Martijn

 
 

Drupal is a registered trademark of Dries Buytaert.