Closed (fixed)
Project:
Taxonomy Redirect
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2009 at 14:14 UTC
Updated:
28 Nov 2009 at 07:30 UTC
hello
i have one vocab that is shared by to content-types. how can i reach that they redirect to two different views?
i didn't manage with php variables ...
can somebody help? is it possible?
thanks momper
Comments
Comment #1
agileware commentedYou could make the php code load the node from the node id in the url, then get the type and determine the path.
This will only work on node pages though.
Will have to think a bit harder to try to find a solution that works everywhere (if it is possible).
Comment #2
agileware commentedI 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.