By smzur22 on
Hi! I've been searching the net for ages without any solution to my problem.
Here's the thing:
I'm trying to make term-links go to "myview&tid=" instead of "taxonomy/term/" which is the default link in taxonomy.module.
I'm trying to edit the function: function taxonomy_term_path($term) to return 'myview&tid='. $term->tid; instead of the original value but the special characters (&) and (=) ends up getting encoded into %26 and %3D which kills my link.
Is there a way to escape these characters from getting encoded? I'm not too familiar with PHP and could need the help!
Thanks for your time and happy holidays!
/andreas
Comments
Use a hook and URL
First, be sure that you aren't editing the core function.
http://drupal.org/node/144376
You want to use a hook for such a modification.
http://api.drupal.org/api/function/hook_term_path/6
Second, this may work better if you assemble the path using the URL function.
http://api.drupal.org/api/function/url
Note: in the function name, replace "custom" with your custom module or template name.
---------------------------------
Steven Wright
Slalom