开发者

Drupal path pattern token if/then

开发者 https://www.devze.com 2023-04-08 20:30 出处:网络
I would like to do something like if [node:subtitle] is available make the path pattern [node:title]-[node:subtitle]

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

精彩评论

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