Copied to clipboard

Flag this post as spam?

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


  • Fredrik Esseen 610 posts 906 karma points
    Nov 03, 2010 @ 09:58
    Fredrik Esseen
    0

    How to sort custom Menu

    Hi!

    Im about to create a quite advanced solution for a customer.

    The goal is to let the member sort his own menu.

    Somehow i want to display all menuitems and let the member drag the items the same way as we do today in the backend. The problem is that this menu should be unique for every member.

    My first thought is to add a datatype to the members properties with all menuitems using ultimate picker (or something similar), preferably a datatype that allows sorting.

    Then let the member get access to the porperty in the frontend and customize the sorting.

    My next problem is how to use that sorting for the menu. Today I use the cognavigation which works fine but somehow i must use the property menu instead of the original one.

    Someone got a tip in the right direction?

  • Rich Green 2246 posts 4008 karma points
    Nov 03, 2010 @ 10:06
    Rich Green
    0

    You could just store the node ids in a cookie like this 1010,1029,1011 for the menu items, then pull them out based on this cookie value in xslt, if there is no cookie just return them in the order they are in umbraco.

    Rich

  • Fredrik Esseen 610 posts 906 karma points
    Nov 03, 2010 @ 10:09
    Fredrik Esseen
    0

    Interesting thought but then its dependant on the computer and not the member? If the member uses another computer it will show the default menu, right?

  • Rich Green 2246 posts 4008 karma points
    Nov 03, 2010 @ 10:12
    Rich Green
    1

    It's just a concept, however if you want it to work with logged in members, then just add a field to the member that stores the node ids in the same manner.

    Rich

  • Fredrik Esseen 610 posts 906 karma points
    Nov 03, 2010 @ 10:21
    Fredrik Esseen
    0

    Sounds like a great and simple idea!

    Then i can display a list with sortable items in the frontend and update the field after the sorting.

    Next problem is to use that sortorder to display the menu in xslt with its subitems but should be solvable as well?

    Thx!

Please Sign in or register to post replies

Write your reply to:

Draft