AutoNav duplication

Permalink
Hi all.

I have a situation whereby I want to have AutoNav in two places on the homepage. I have one at the very top of the page, then as the user scrolls down past a slider, I have another menu that then sticks to the top of the page as the user scrolls down, this can be seen herehttps://www.goldenjubileefoundation.org/NEW/...

Now, in my homepahe.php I am adding two new Global Areas, one called Main Na (for the one at the top) and one called Main Nav Sticky (obviously the one that sticks :)

The gloabl areas are created, and Auto Nav has been added to both GloabalAreas, BUT, the issue is, that when you click on either of the navigation menu icons, both menus appear at the same time, and each menu has 2 menus in it????

Here is the code that generates these areas on the home page...

<section>
      <div class="container-fluid">
   <div class="child">
   <div class="row">
      <div class="col-xs-12 col-sm-8 logo">
      <?php
                     $a = new GlobalArea('Foundation logo');
                     $a->display();
                  ?>
   </div>
      <div class="col-xs-12 col-xs-4">
               <?php
                     $a = new GlobalArea('Main Menu');
                     $a->display();
                  ?>


Anyone come across such a conundrum? Be grateful for any help, pointers, complete solution to my world ending problem ;)

Thanking you all in advance.

DigitalCrate
 
stewblack23 replied on at Permalink Best Answer Reply
stewblack23
Hey DigitalCrate

Odds are the the classes you are using to open and close the menus are exactly the same. So the Javascript is just open and closing both menus. Best way to do it is create a custom view template for each navigation area, then have two separate function in your javascript file to open and close the menu.
JohntheFish replied on at Permalink Reply
JohntheFish
If you created the second menu by copy/paste of a block in concrete5, try editing and then saving the pasted block. Some blocks wrongly depend on the blockID and edit/save will give the pasted block a new ID.

If its a marketplace theme or addon supplying the nav template, contact the developer through GetHelp and they should fix such an error.
DigitalCrate replied on at Permalink Reply
DigitalCrate
Thanks you for your time and comments. Managed to get it fixed :)
stewblack23 replied on at Permalink Reply
stewblack23
Great to hear this worked out for you.