But specifying the rules in the UrlManager will apply to both the routing of requests as well as the construction of the url by the CHtml helper method.
This was the bit of information I was looking for. I already had urlFormat=‘path’, but the problem was that only a part of the path was converted. Moving my custom rule to the front of the array solved the problem. This shows that the rules are parsed in order they are assigned in, and the rules parser will stop at the first match. Conclusion: order your rules from most specific to least specific.