3 Replies Latest reply on May 17, 2009 4:32 AM by Purple Edge

    Dynamic tree menu - help


      Hi! how can I make dynamic menues (database driven) like the ones generated with MX Tree Menu?? can I do this with tools from ADDT?? and how? - or do you know any other extension, widget or tool for DW that can do something similar with MX Tree Menu???


        • 1. Re: Dynamic tree menu - help
          Purple Edge Level 1

          I've just created a Spry Menu using a slightly modified version of CSS_Menu 2, the original CSS_Menu 2 started behaving very strangely with IE8, so I had to replace it! You have to call the functions manually, since the extension stopped working a couple of version of DW ago.




          The code to call this is identical to the code used by css menu 2, but is actually simpler.


          I can't post Adobe's code, but I can post some tips if you want to try it?

          • 2. Re: Dynamic tree menu - help
            The1Morph Level 1

            I want to try it so, if you want, send me some info on the menu from your example... can you update the database and the menu will update itself? if you add a category in the database it will show in the nenu? how can I link the menu to a recordset in the database and how can I make it see the difference from category and subcategory... in other words... how can I make it a dynamic menu linked to a mysql database table similar in functionality with tree menu from Interakt? (a spry menu with this functions will be greate )



            • 3. Re: Dynamic tree menu - help
              Purple Edge Level 1

              Play around with it, it is simpler than you think! Add a spry menu to a page with a css menu on it, see how it is structured, then make the changes to get the results you want. A Spry menu uses a UL/LI structure very similar to that generated by css_menu, you just need to add a class to the LI.



              //CSS Dynamic Menus required file
              //Begin Menu1
                $Menu1 = new MX_Menu2('MenuBar1');
                //URL parameters
                // Layout
                $Menu1->setSkin("MenuBarVertical");  <---------
              //End Menu1



              <?php  // Dynamic CSS Menu 
                echo $Menu1->render();




                foreach($this->DBItems[$id] as $key=>$val){
                  $li_class = ' class="MenuBarItemSubmenu"';     <-----
                  //the efective row