We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49710
    • 92 Posts
    Hello,

    I want to build a OnePag-Site.

    I stuck al litte bit with the navigation and Wayfinder

    Site-Concept:
    Every party of the Site is a singe resource in the tree. Inside the Template there are
    section with specific IDs and wit getResorces the resource will be associated to the specific sections.

    How do I the navigation with way finder. I want a output like this:
    	<ul id="topnav">
    					<li><a href="#" onclick="$('#start').animatescroll();">Home</a></li>
    					<li><a href="#" onclick="$('#about').animatescroll();">About</a></li>
    					<li><a href="#" onclick="$('#book').animatescroll();">The Book</a></li>
    					<li><a href="#" onclick="$('#read').animatescroll();">Read</a></li>
    				</ul>
    • Use the rowTpl along with placeholders to create the links:
      <li [[+wf.classes]]><a href="#" onclick="$('#[[+wf.alias]]').animatescroll();">[[+wf.linktext]]</a></li>


      This is presuming that your getResources tpl is using the resource's alias to generate its ID attribute as the target (id="[[+alias]]")
        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