I'm using a 2 level navigation using xslt. Everything works fine. But now I realized that when a user returns to the previous 1st level menu option, it would be nice if the 2nd level he previously had selected was still "active".
Is this even possible in Umbraco? How?
For example:
Fruit - Apples - Oranges Books - Bible - Coran
If a user comes from Oranges page, to the Bible page, and then clicks on Fruit option, he/she should get to Oranges (because that was where he was last time he visited Fruit).
I'd do something like this with a Cookie, since it's just a convenience layer - maybe use a combination of "Cookie.js" (google it) and the available umbraco.library functions and setCookie() and RequestCookies() for persisting?
I was thinking of keeping a search form state as the user navigates a site. Returning to the search page would retain the search terms and previous results.
menu navigation - remember previous option
I'm using a 2 level navigation using xslt. Everything works fine. But now I realized that when a user returns to the previous 1st level menu option, it would be nice if the 2nd level he previously had selected was still "active".
Is this even possible in Umbraco? How?
For example:
Fruit
- Apples
- Oranges
Books
- Bible
- Coran
If a user comes from Oranges page, to the Bible page, and then clicks on Fruit option, he/she should get to Oranges (because that was where he was last time he visited Fruit).
Thanks,
Duarte
Just adding a PS - this gets me thinking on how Umbraco handles persisting of anything really. A form input?
Duarte
Hi Duarte,
I'd do something like this with a Cookie, since it's just a convenience layer - maybe use a combination of "Cookie.js" (google it) and the available umbraco.library functions and setCookie() and RequestCookies() for persisting?
/Chriztian
Chriztian,
Thanks for the tip. I'll look into it. Seems reasonable.
But the general issue of persistence remains, for example how to handle bigger chunks of data? Are user controls the only solution (using session)?
Duarte
Just a word of warning with Session, as recently on one project, Session values were lost. We had to change to using query string and cookies.
Richard
Thanks for all suggestions.
I was thinking of keeping a search form state as the user navigates a site. Returning to the search page would retain the search terms and previous results.
I'm marking Chriztian reply as a solution.
Thanks,
Duarte
is working on a reply...