Hexagon Geospatial
MENU

Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Regular Contributor
Posts: 238
Registered: ‎05-01-2016
Accepted Solution

Collapsing Banner and Left Panel of Gwmpub.aspx programatically

[ Edited ]

Is there a  way to collapse the banner and left panel of gwmpub.aspx via code - i just want to do the same thing that happens when I click on the >> located on the benner and the left panel.  Thanks!  I know i can change the style file but i want to use the same SDK application for two purposes and need to collapse both of them for one of the apps (would base it on URL used to startup:


http://xxx/portalsdk/gwmpub.aspx?gwm=....&collapse=Y  (or collapse=N)

Regular Contributor
Posts: 238
Registered: ‎05-01-2016

Re: Collapsing Banner and Left Panel of Gwmpub.aspx programatically

[ Edited ]

Both banner and left panel can be collapsed by modifying layouthelper.js  to check the URL used to start up and changing bannerState and stideState to false to collapse both the banner and the left pannel.  Below i am checking that "PlantStatus" is included in the startup URL

 

 

    var sideState = getCookie(sideStateName);

        State = getCookie(sideStateName);

        chkString = location.href;
        if (chkString.indexOf("PlantStatus") > -1) {
            sideState = "false";
        }  // collapses panel if PlantStatus is part of url

        if (sideState === "true")
            sidebar.expand();
        else if (sideState === "false")
            sidebar.collapse();

     

            State = getCookie(bannerStateName);
            chkString = location.href;
            if (chkString.indexOf("PlantStatus") > -1) {
                bannerState = "false";
            }

           
            if (bannerState === "true")
                banner.expand();
            else if (bannerState === "false")
                collapseBanner()   //collapses banner if PlantStatus is part of URL
        }

 

Do you need immediate support?
Please submit a Ticket through our
Development Ticket Portal.