10-21-2018 06:46 PM - edited 10-21-2018 06:47 PM
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)
Solved! Go to Solution.
10-22-2018 08:40 AM - edited 10-22-2018 08:40 AM
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 }