Introduction

Since version 1.4 workflow-ng comes with some conditions and actions, that allow one to configure automatic path aliases. So this can be used as a light-weight alternative to the pathauto module. Don't expect it to be a feature complete replacement of pathauto.

But what are the pros?
* I can save yet another module.
* I don't want all the default aliases for users and taxonomy terms.

Both might have an impact on the performance of bigger sites. So if you already use workflow-ng, so why not use it for automatic path aliases?

And the cons I'm aware of:
* Pathauto cleans only the tokens, workflow-ng cleans the whole path
* There is no mass-alias routine for old content. But it should be possible to use pathauto's routine for that.

How to do it?

Go to http://drupal.org/node/202331 and import the configuration. Adapt it like you want, e.g. restrict it to a special content type by adding a condition that checks the content type.

That's it. :)

So when content is being created, the url alias will be created. Afterwards when content is updated, it won't be changed as URLs should be stable. However you can still manually alter the alias like usual. If you prefer to have it changing automatically, just adapt the configuration...

Customizing path cleaning

It's possible to customize the path cleaning replacements of the action. This can be done through the settings.php. E.g. I'm using this to replace for a more suitable replacement of german umlauts:

$replace = array(
'/Ö/' => 'Oe',
'/ö/' => 'oe',
'/Ä/' => 'Ae',
'/ä/' => 'ae',
'/Ü/' => 'Ue',
'/ü/' => 'ue',
'/ß/' => 'ss',
'/[^a-zA-Z0-9_\/]+/' => '-',
);
$conf['workflow_ng_clean_path'] = array(array_keys($replace), array_values($replace));

Improvements?

A possible improvement would be to allow changing URL aliases, but automatically configure path redirects for the old aliases like pathauto supports now, when the path redirect module is activated. For this, one would of course need the path redirect module and an a workflow-ng action to add path redirects.