开发者

Drupal path pattern token if/then

I would like to do something like

if [node:subtitle] is available make the path pattern 
[node:title]-[node:subtitle]
else 
[node:titl开发者_开发知识库e]

What is the best way to do something like this?


You can't do it with the pathauto module I'm afraid, it simply doesn't have this functionality. You'd have to implement hook_node_presave() and change the path manually for each node you want to do this for.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜