开发者

Drupal: using Rules, apply pathauto settings to node

开发者 https://www.devze.com 2022-12-20 02:18 出处:网络
I need to use Rules to create a rule that updates the path for the currently saved node according to the settin开发者_如何学Gogs pathauto uses. The conditions for the rule are content type and that on

I need to use Rules to create a rule that updates the path for the currently saved node according to the settin开发者_如何学Gogs pathauto uses. The conditions for the rule are content type and that one of several fields have been modified.


Pretty sure you can't use Rules to interact with Pathauto, but you can use Rules action: "Create or delete a content's URL alias" which basically does the same thing as pathauto (i.e., lets you use tokens to create paths).

So just create a new rule, add those filters to the IF (i.e., if content has type blahblah and (xxx field has been modified OR yyy field has been modified OR zzz field has been modified)), and use the "Create or delete a content's URL alias" action to change the alias, and you should be good.


Pathauto already automatically applies its settings. You don't need the rules module.

0

精彩评论

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

关注公众号