Need dynamic PM alert email link
We have four different communities on our instance of Lithium with one half being the default and working great and going through one login area and then we have the other 3 that have to come in through another login. Everything works great with some redirects I have for people trying to visit a URL for one of the other sub-communities but I still have one issue. In the PM email alert with the "click here" link. I somehow need this link to be dynamic so if someone is in one role it will take them to the login portal associated with that sub-community but if they have another role then they need to be directed to a login portal for that sub-community.
So the conditional for that link needs to be:
If in role A send to [url for role A login]
or if in role B send to [url for role B login]
of if in role C send to [url for role C login]
or if in role D send to [url for role D login]
This has to be applied to the "click here" link to PMs in the PM alert email template.
Is there any way to do this?