PDA

View Full Version : SwitchMenu sub1 Open Upon First Load instead of Closed



Crimsonbat
03-20-2006, 04:55 PM
Here is how I have my hiearchy set up.

A
-1
-2
-3

I use sitewide persistence. By default, the menu initially loads as closed unless I click on "A" and works fine. However, I want the menu to be initially open when a user first visits the page, but can still open and close it. If they close it, sitewide persistence is still applied so if the user browses to another page, it stays closed, or open depending on how the user wants it. I have viewed a solution here:

http://www.dynamicdrive.com/forums/showthread.php?t=7990

However, I noticed upon using that solution, the sub1 continues to stay open after browsing to another page or refreshing the browser, thus sitewide persistence is no longer existant. Please help.

jscheuer1
03-20-2006, 11:03 PM
The intention of that modification was to have the selected sub always open on page load. For what you want, more extensive modification was required. I bit the proverbial bullet and if you now check the thread you mention above, you will find a mod for your purpose. If sitewide persistence is enabled, the preference for sub whatever that you set in the code lasts only for the first time load per session. Although, even using the simpler mod has more utility than I think you first realized if coupled with a different sub on each page, a home sub, if you will for that page.