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
d.sureshkumar41.33978150573839d.sureshkumar41.33978150573839 

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.
 
ShashankShashank (Salesforce Developers) 
Did you check in the browser's javascript console for any errors?