We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4429
    • 429 Posts
    i tried the basic drop down menu at muddy paws and the ultimate drop down, but both failed to work correctly.

    It has been recomended I try Project 7’s Express dropdown menu:
    http://www.projectseven.com/tutorials/navigation/auto_hide/index.htm

    this is great but it is all html - how do I convert it to use wayfinder?

    For example here is the html

    <div id="main-nav">
    
    <div id="menuwrapper">
    <ul id="p7menubar">
    <li><a href="#">Home</a></li>
    <li><a class="trigger" href="#">Trigger One</a>
    <ul>
    <li><a href="#">Sub 1.1</a></li>
    <li><a href="#">Sub 1.2</a></li>
    <li><a href="#">Sub 1.3</a></li>
    <li><a href="#">Sub 1.4</a></li>
    </ul>
    </li>
    <li><a class="trigger" href="#">Trigger Two</a>
    <ul>
    <li><a href="#">Sub 2.1</a></li>
    <li><a href="#">Sub 2.2</a></li>
    <li><a href="#">Sub 2.3</a></li>
    <li><a href="#">Sub 2.4</a></li>
    <li><a href="#">Sub 2.5</a></li>
    </ul>
    </li>
    <li><a class="trigger" href="#">Trigger Three</a>
    <ul>
    <li><a href="#">Sub 3.1</a></li>
    <li><a href="#">Sub 3.2</a></li>
    <li><a href="#">Sub 3.3</a></li>
    <li><a href="#">Sub 3.4</a></li>
    <li><a href="#">Sub 3.5</a></li>
    <li><a href="#">Sub 3.6</a></li>
    <li><a href="#">Sub 3.7</a></li>
    <li><a href="#">Sub 3.8</a></li>
    </ul>
    </li>
    </ul>
    <br class="clearit">
    </div>
    
    </div>


    If i put that in my template what wayfinder calls go in there?

    I’m a complete novice at this
      • 4310
      • 2,310 Posts
      This is untested for the Project 7 menu but should be there or nearly there!
      Create a file named project-seven.config.php with the following code in it:
      <?php
      	
      	$startId = 0;
      	$level = 2;
      	$hereClass = ''; 
          $firstClass = '';
          $selfClass = ''; 
          $lastClass = '';
          $levelClass = '';
          $innerClass = '';
      	$parentClass = 'trigger';
      	$outerClass = '';
      
      	$outerTpl = '@CODE:<div id="main-nav">
      	<div id="menuwrapper">
      		<ul id="p7menubar">
      			[+wf.wrapper+]
      		</ul>		
      <br class="clearit">
      	</div>
      	</div>';
      
      	$rowTpl = '@CODE:<li[+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>';
      
      	$parentRowTpl = '@CODE:<li><a [+wf.classes+] href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>';
      	
      ?>

      FTP into assets/snippets/wayfinder/configs/
      Add the link to your CSS file into the head section of your template.
      Use this snippet call in your template:
      [[Wayfinder? &config=`project-seven`]]  
        • 4429
        • 429 Posts
        Thanks - that has sorted out the look of the menu, but I am still missing the actually drop down element.

        The site is at http://www.eastcoastlacrosse.co.uk/modx/playlacrosse

        The mens and news menu items should both have sub menus. These should should drop down, but the don’t.

        What do I need to edit do make them work?
          • 4310
          • 2,310 Posts
          Sorry, I did it really quickly and ommited the [+wf.wrapper+] in the parentRowTpl.
          I’ve edited my original code to correct it!

          David
            • 4429
            • 429 Posts
            Thanks.That works. I just need to get my head round the CSS file now.

              • 4310
              • 2,310 Posts
              Glad you got it working.