If one set up a url pattern for nodes of certain type to node/[node:title] and then try to create a node with title this is my title the generated pattern is node/my-title. This is because pathauto removes common words by default.

I found that some of the value processing is happening at cleanString inside AliasCleaner.php class. This can be changed via pathauto configuration at admin/config/search/path/settings. However, changing the setting is global and I need don't intend on removing this default behavior globally.

Is it possible to hook into the cleanString process and alter it only for a specific content type?

  • The pathauto configuration has a list of words it will automatically remove. If you remove them from the list, it won’t remove the words anymore. – Kevin Jul 6 '19 at 23:11
  • I don't want to change the global settings. Is there a way to hook into this behavior and change it based on some rules i.e. content type? – awm Jul 6 '19 at 23:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.