I have the Apex class code:
public class myController {
public string url{
get {
if (this.url == null)
this.url = System.URL.getSalesforceBaseUrl().getHost();
return this.url; }
set;
}
}
I have Visualforcetemplate code for email alert in workflow rule:
<messaging:emailTemplate recipientType="user" relatedToType="order">
<messaging:htmlEmailBody >
<html>
<body>
<center>
<p><br>
Click on below link to go to this user setup:
"**I want to use the instance here**/{!$User.Id}"
</br></p>
</center>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
**How to write the visualforce component code for accessing the instance there?**in Visualforce page template in email alert in salesforce
Please anyone guide me for the Answer
I have tried :
<apex:component controller="myController" access="global">
<apex:value="{!myController}" var="s">
<!s.uri>
</apex:value>
</apex:component>
The above one is correct?