We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25586
    • 105 Posts
    Hi, I would like to say that I’m beginning to like modx laugh I have a question about the Wayfinder.

    I have a custom template and It’s giving me a hard time getting my menu to work properly.

    I made the menu first in dreamweaver and a link button looks like this,

    <div id="horMenu">
      <ul>
        <li><a href="#" title="myTitle"><span>Homework</span></a></li>
      </ul>
    </div>
    


    Is it possible to work with the <span> element? I have to use it because I am using rounded corners. And I cant get it working with Wayfinder sad

    Hope anyone can help me,

    Would be great smiley

    Rogier
      • 4310
      • 2,310 Posts
      In the most basic form for a single level menu you need:
      A chunk for the outer template to contain
      <div id="horMenu">
      	    <ul>
      	        [+wf.wrapper+]
      	    </ul>
      	</div>

      Another chunk for the row template to contain
      <li><a href="[+wf.link+]" title="[+wf.title+]"></a><span>[+wf.wrapper+]</span></li>

      If you named them "outer" and "row", in the Wayfinder call use:
      [!Wayfinder! &startId=`0` &outerTpl=`outer` &rowTpl=`row`!]

      Have a look at http://www.muddydogpaws.com/development/wayfinder/parameters.html for further guidance.
      EDIT:Corrected as per Susan’s post
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Elements aren’t nested properly; the <span> element begins inside of the <a> element and closes outside of it, and the rest of the menu will be stuffed inside of the <span> element! I think you meant
        <li><a href="[+wf.link+]" title="[+wf.title+]"></a><span>[+wf.linktext+]</span>[+wf.wrapper+]</li>
          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
          • 25586
          • 105 Posts
          Thanks, I will look in to it smiley Keep you updated laugh
            • 25586
            • 105 Posts
            W00t, its working laugh Thank you so much!

            Rogier