You need to sign in to do that
Don't have an account?

CustomerPortal Header Issue
Hi,
I'm looking to use Global variables in portal header html file but it is not working and the portal is used with site.I tried like below.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script src="/resource/jquery/jquery-183.js"></script>
<script>
window.onload = setupPage;
function setupPage(){
var siteId = '{!$Site.SiteId}';
console.log('====siteId====='+siteId);
}
</script>
</head>
<body>
</body>
</html>
I am not getting siteId.
Any ideas gratefully received.
Thanks in advance.
I'm looking to use Global variables in portal header html file but it is not working and the portal is used with site.I tried like below.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script src="/resource/jquery/jquery-183.js"></script>
<script>
window.onload = setupPage;
function setupPage(){
var siteId = '{!$Site.SiteId}';
console.log('====siteId====='+siteId);
}
</script>
</head>
<body>
</body>
</html>
I am not getting siteId.
Any ideas gratefully received.
Thanks in advance.


Did you check in the browser's javascript console for any errors?