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.
精彩评论