I would like to do something like
if [node:subtitle] is available make the path pattern
[node:title]-[node:subtitle]
else
[node:title]
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.