Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple menu issue #30

Open
proximo7 opened this issue Apr 5, 2017 · 0 comments
Open

multiple menu issue #30

proximo7 opened this issue Apr 5, 2017 · 0 comments

Comments

@proximo7
Copy link

proximo7 commented Apr 5, 2017

I have a large menu with complex HTML. Because of how the HTML is structured I had to use multiple configurations and separate nodes. I had hoped to just use one but couldn't find another way.

The problem I'm seeing now is that sometimes all the nodes reset to show the entire menu hierarchy. Other times the menu outputs correctly. Here's a sample of the code:

{% set navConfigPatients = { 'startWithChildrenOfNodeId' : 42827, 'maxDepth' : 3 } %}
{% set navConfigServices = { 'startWithChildrenOfNodeId' : 42853, 'maxDepth' : 2 } %}

<div class="dropdown w-dropdown" data-delay="0">
          <div class="dropdown-nav nav-link w-dropdown-toggle">
    			<div>Patients</div>
     	  </div> 
           
          <nav class="dropdown-list w-dropdown-list">
			  {% set navigation = craft.navee.getNav('main', navConfigPatients) %}    
              {% nav node in navigation %}
                     <a class="dropdown-nav-link w-dropdown-link" href="{{ node.link }}">{{ node.title }}</a>
                    {% ifchildren %}
                        {% children %}
                    {% endifchildren %}
              {% endnav %}
           </nav>   
       </div>  
      
          <div class="dropdown w-dropdown" data-delay="0">
            <div class="dropdown-nav nav-link w-dropdown-toggle">
              <div>Services</div>
             </div>
            <nav class="dropdown-list w-dropdown-list">
            	{% set navigation = craft.navee.getNav('main', navConfigServices) %}    
                {% nav node in navigation %}
                       <a class="dropdown-nav-link w-dropdown-link" href="{{ node.link }}">{{ node.title }}</a>
                      {% ifchildren %}
                          {% children %}
                      {% endifchildren %}
                {% endnav %}
             </nav> 
          </div>

Is there a better way to do this? Is there a way to fix the issue I'm seeing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant