I have been trying to do this using $node->type
I also tried with $variables['type']
neither of these approaches work, the $nodetype variable is empty
Do I have to specifically load the $node object for a given node using the $nid
I am trying to redirect to a different url based on the node type.
Any suggestions??
After many varied attempts I am still unable to target a taxonomy_redirect to a particular node type.
I tried this which I thought would work but did not (it works in a tpl but not in taxonomy_redir)
Eventually I had to take a different route and installed pathauto to auto add clean urls to nodes/content types
so it ends up as sitename.com/news_article/title_xyz
then I am able to use this code which works perfectly
Comments
Comment #1
jimijamesi commentedI have been trying to do this using $node->type
I also tried with $variables['type']
neither of these approaches work, the $nodetype variable is empty
Do I have to specifically load the $node object for a given node using the $nid
I am trying to redirect to a different url based on the node type.
Any suggestions??
Comment #2
jimijamesi commentedAfter many varied attempts I am still unable to target a taxonomy_redirect to a particular node type.
I tried this which I thought would work but did not (it works in a tpl but not in taxonomy_redir)
Eventually I had to take a different route and installed pathauto to auto add clean urls to nodes/content types
so it ends up as sitename.com/news_article/title_xyz
then I am able to use this code which works perfectly