Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Duarte Carreira 47 posts 66 karma points
    Jan 27, 2011 @ 00:13
    Duarte Carreira
    0

    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

  • Duarte Carreira 47 posts 66 karma points
    Jan 27, 2011 @ 00:15
    Duarte Carreira
    0

    Just adding a PS - this gets me thinking on how Umbraco handles persisting of anything really. A form input? 

    Duarte

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 7x admin c-trib
    Jan 27, 2011 @ 00:26
    Chriztian Steinmeier
    1

    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

  • Duarte Carreira 47 posts 66 karma points
    Jan 27, 2011 @ 01:16
    Duarte Carreira
    0

    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

  • Richard 146 posts 168 karma points
    Jan 27, 2011 @ 14:22
    Richard
    0

    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

  • Duarte Carreira 47 posts 66 karma points
    Feb 03, 2011 @ 12:55
    Duarte Carreira
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft