I have a simple Visualforce page with just an Iframe inside.
I want to send as parameter to this Iframe the Instance URL.
To do this I use Global Variables, it is working for other parameters like {!$CurrentPage.parameters.id}
or {!$Api.Session_ID}
.
{!$Site.BaseUrl}
or any other {!$Site.xxx}
working only in Force.com site.
How can I get the instance URL from this VisualForce Page?
<apex:page standardcontroller="Case" showHeader="false" title="PIM" >
baseurl {!$Site.BaseUrl} name{!$Site.Name} {!$CurrentPage.parameters.id} {!$Api.Session_ID}
<apex:iframe src="anyURL" scrolling="true" id="theIframe"/>
</apex:page>
$Site
if the page is running on a Salesforce Site, is your VF page running in that context?