Project:Taxonomy Redirect
Version:6.x-1.3
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

I tried to create a redirect using php. Here is the code I used:

return "node/" . $node->nid;

That didn't work. I tried to create a function to get the current node id and then append that. That worked on full node pages but not on teasers.

There must be a way to redirect a term to the full page of current node instead of the term page.

Comments

#1

Status:active» fixed

I have committed a change to 5.x-1.x and 6.x-1.x that adds $nid as a variable when using PHP to create paths.

It uses debug_backtrace to get the $node object from the last call to taxonomy_link (which then calls taxonomy_term_path, which then invokes hook_term_path).

So you can now use that to load your node and go from there.

#2

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.