function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
tarun.khandelwal1.3965028573349685E12tarun.khandelwal1.3965028573349685E12 

How to retrieve Community login URL in Visualforce Email Template

Hello All,

I have to create a custom visualforce email template.
Earlier we were using built in text based email template.
There we used {!Community_Url} to get Community URL's.
Now since we moved to Visualforce email template, how can i get the same url working here.
Vinita_SFDCVinita_SFDC
Hi,

Try using {!Community_Url}, also refer following threads:

http://salesforce.stackexchange.com/questions/18209/update-salesforce-community-url-to-custom-login-page

https://developer.salesforce.com/forums?id=906F000000096OEIAY

http://salesforce.stackexchange.com/questions/12936/get-a-fully-qualified-url-in-visualforce-and-communities-sites


tarun.khandelwal1.3965028573349685E12tarun.khandelwal1.3965028573349685E12

Hello Vinita,

These merge fields doesn't work with Visualforce Email Templates.

So i cannot use these.
I tried {!$Page.<LoginPage>}. This gives me Login page for current session.
It works fine if i am logged in to community, but if i logged in as a salesforce user, then it gives me salesforce login url.
I was looking for something different.