开发者

Drupal: Best place to put drupal_goto

I need to redirect certain content types to other nodes.

As a proof of concept I've got this working with a drupal_goto at the top of node--[type].tp开发者_StackOverflow社区l.php

This works great, but is probably the least optimized place to put it.

Would phptemplate_preprocess_node be too early? What about hook_nodeapi, $op='view'?

Where's the smartest place to put a drupal_goto?


hook_nodeapi's view hook is where I'd put it, yeah. It's going to be one of the first spots you'll have the $node variable to inspect for the node types you're redirecting.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜