Is there any API for alias generation or do I have to take care of it personally?
I saw the code from NewsPublisher but for the same news title it creates the same alias.
Maybe a function with a title parameter would be useful.
$newAlias1 = $modx->generateAlias('post title');
$newAlias2 = $modx->generateAlias('post title');
And the values would be $newAlias1 == ’post-title’ and $newAlias2 == ’post-title1’.
Or something similar.
The other thing is if you let the aliases to be duplicated, if you have friendly path enabled.
Once you disable it, it’s a mess.
Maybe a function that checks for duplicate aliases and renames them accordingly, if the user confirms?