Side Menu back/return button

  • Hi everyone,
    I've made some sub menus with the Side Menu by Umalo with the following type of structure:

    Code
    <group name="level_0" >
    <group name="object_1" value="Group_Name_1" link="switch_menu(1);" /></group>
    <group name="level_1">
    <group name="object_1" value="Group_Name_2" link="switch_menu(2);" /></group>
    <group name="level_2">	
    <group name="object_1" value="Group_Name_3" /></group>

    By default, the "back button" (I believe the plugin name for it is "submenu_back" in the sidemenu.xml) in the menu always brings me back to "menu(0)" or "level_0". However, I want it to only go back one level at a time. So if I were in "menu(2)" or "level_2", I would want the "back button" to bring me to "level_1" and not "level_0". How can I do this?

  • Sorry, but if you know a plugin by Umalo support only one sublevel. You can use only level 0 (groups) and sublevel level 1 (elements).
    So in any case you will be able to go back just once up to level 0!
    …if I understand your question
    *cool*

    Panoreal — to make and see this wonderful world! *whistling*

  • But isn't there maybe a way to set up some "if cases" or something? I've managed to get some of it working that way, but I don't fully understand how these if actions work or how I should name the conditions in order for the menu to behave as I want it to.

  • You can always to return only 1 step up to main levels of groups and button "back" have only in subgroup! Do you agree??
    is why there is only one level where there is the button.
    For this reason, I do not see any reason solve your task because is not support in "plugin" or you need to remake the plugin was to support nested subgroups ;)
    Or do you already remade this plugin and were able to Add more subgroups?
    PS: Sorry for my English *whistling*

    Panoreal — to make and see this wonderful world! *whistling*

  • Yes, I suppose you are right. But there must be some kind of workaround, right? This is what tells the "back" button what to do when clicked:

    Code
    onloaded="set(plugin[submenu_back].onclick, switch_menu(0)"

    I was thinking maybe there is a way to say in addition to that: if level_2 or "menu(2)" is loaded, then it should go to level_1. Isn't this the kind of thing where "if actions" can be used? I just don't know how to write the code so that it works... Or maybe there is another way. The thing is, I've got a customer who wants the button to behave this way and I've already worked so much on the interface that I don't want to have to find a whole new replacement for the side menu!

  • I need think about this...
    or do so in the current example by Umalo, the first level was not hiding, but only disclosed the group?
    you could do a sketch with the result that you want to get? *wink*
    PS: I'm just also trying to adapt, and this menu is so interested in this!
    BTW, maybe you needed use a accordion menu, If you have not a lot items in your menu of panoramas, like this:
    https://krpano.com/plugins/userplugins/accordionmenu/#top

    Panoreal — to make and see this wonderful world! *whistling*

  • I have already modified the side menu quite a bit and I have everything working just as I want it to! The only thing still missing is how this button behaves... There must be some one who has a solution? Taking something new instead, like an accordion menu, would mean I would have to redo the entire interface and all that just because one button was not behaving the way it should...?

  • it's not work in krpano 1.16.9
    I was thinking I did something wrong. But checked on an earlier version. Everything is OK.
    So there is some problem in plugin with krpano 1.16.9



    I solved the question myself. I put the initiate_menu(); before the startup();

    Code
    onstart="initiate_menu();startup();"

    Edited once, last by myp3ilka (February 21, 2014 at 11:46 AM).

  • Checked as usually. Checked now. All fine. Are you sure you have no some popup blocker, proxy issues...what ever....


    Hmm... very interest)
    I on't have permission to access! *confused*

    "Forbidden

    You don't have permission to access /radna-mapa/anton/__krpano__/_shared_/side_menu_3level/ on this server.
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request."

    Ok, I'll to try later!

    Panoreal — to make and see this wonderful world! *whistling*

  • It must be realted to plitical situation there, so all I can do it send it to you via mail or other ways if this can help. Next time contact me directly to coordinate actions.
    (hope you are fine...watching TV and thinking about you)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!