3

I am using an email template with a massive number of URLs. It has go to the stage where I'd like to define the URLs on the top of the page once and the use them in the template (some of them are used more than once).

Is this possible?

I'm guessing the closest, I could get would be to define them in a back end controller and then pull them in?

Comments welcomed.

3

If you don't mind using Visualforce email templates, you can do it inline without a controller:

<apex:variable var="protocolAndHost" value="http://www.example.com" />

<a href="{!protocolAndHost}/">home</a>
<a href="{!protocolAndHost}/about">about</a>
<a href="{!protocolAndHost}/contact">contact</a>

As food for thought, I'd also have pointed you at Custom Settings so you could keep the Email Template as text/html, but it's a no go!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.