We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50595
    • 32 Posts
    Hi there community

    I just created my main navigation with Wayfinder (2.3.3-pl). Basically I copied the chunks from an other site I created some weeks ago (2.3.3-pl also). But this time there's something strange: Wayfinder creates an redundant item that's empty.

    <li class="has-submenu">
    	<a href="#">Nav-Item</a>
    		<ul class="submenu">
    			<li>
    				<a href=""></a>
    			</li>
    			<li>
    				<a href="#">Sub-Item 0</a>
    			</li>
    			<li>
    				<a href="#">Sub-Item 1</a>
    			</li>
    			<li>
    				<a href="#">Sub-Item 2</a>
    			</li>
    			<li>
    				<a href="#">Sub-Item 3</a>
    			</li>
    			<li>
    				<a href="#">Sub-Item 4</a>
    			</li>
    			<li>
    				<a href="#">Sub-Item 5</a>
    			</li>
    	</ul>
    </li>
    


    By now I can't figure out what's happens here. I cleared caches and re-build the URL in manager. But the redundant item remains. Does anybody know this issue?

    Greetings

    Ralph

    This question has been answered by sottwell. See the first response.

    • What does the Wayfinder call look like?
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 50595
        • 32 Posts
        Hi Susan

        Quote from: sottwell at Feb 03, 2016, 02:10 PM
        What does the Wayfinder call look like?

        The call looks like this:

        [[Wayfinder?
        	&startId=`0`
        	&rowTpl=`rowTpl`
        	&innerTpl=`innerTpl`
        	&parentRowTpl=`parentRowTpl`
        	&outerTpl=`outerTpl`
        	&fullLink=`true`
        	&sortBy=`menuindex`
        ]]
        


        And here we go with the chunks:

        innerTpl
        <ul class="submenu menu vertical">
        	<li><a href="[[+wf.link]]">[[+wf.linktext]]</a>[[+wf.wrapper]]</li>
        </ul>
        


        outerTpl
        <ul class="menu vertical medium-horizontal" data-responsive-menu="drilldown medium-dropdown">
        	[[+wf.wrapper]]
        </ul>
        


        parentRowTpl
        <li class="has-submenu">
        	<a href="[[+wf.link]]">[[+wf.linktext]]</a>
        	[[+wf.wrapper]]
        </li>
        


        rowTpl
        <li>
        	<a href="[[+wf.link]]" title="[[+wf.title]]">[[+wf.linktext]]</a>
        	[[+wf.wrapper]]
        </li>
        


        Greetings

        Ralph
        • Hm. A rudimentary implementation using pdoMenu has me getting the parent as the first item in the submenu, along with a redundant closing </li>. Investigating.



            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
          • discuss.answer
            Ah. Your innerTpl is just for the inner UL element, it shouldn't have that <li> element in it.
            <ul class="submenu menu vertical">
                [[+wf.wrapper]]
            </ul>
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 50595
              • 32 Posts
              Hi Susan

              Quote from: sottwell at Feb 03, 2016, 02:37 PM
              Ah. Your innerTpl is just for the inner UL element, it shouldn't have that <li> element in it.
              <ul class="submenu menu vertical">
                  [[+wf.wrapper]]
              </ul>
              </li>

              That's the solution! Thank you for helping me you.

              Greetings

              Ralph