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

agileware’s picture

You 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).

agileware’s picture

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.

Status: Fixed » Closed (fixed)

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