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

    Hope you can help, I’m using Revolution 2.0.8 and just getting to grips with wayfinder....(Wayfinder for MODx Revolution 2.0.0-beta-5 and later.)
    Everything was going swimmingly smiley until embarrassed i tried to hide my sub menus. My page comes up without the submenus which is great but when i click on the parent link the sub menus do not display and i get taken to a blank page.

    This is my wayfinder call (located in main template):
    [[Wayfinder?&startId=`0`&outerTpl=`menucontainer`&outerClass=`navigation`
    &rowTpl=`menurows`&level=`2`&hideSubMenus=`1`]]

    These are my Tpl’s (located in chunks)

    OuterTpl: <ul[[+wf.classes]]>[[+wf.wrapper]]</ul>

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

    This is the code generated when hideSubMenu=1:

    <ul class="navigation"><li class="first active">
    <a href="http://www.tunedinconsultancy.com/"title="Home">Home</a>

    </li>
    <li>
    <a href="index.php?id=30"title="Blog">Blog</a>

    </li>
    <li>
    <a href="index.php?id=31"title="Services">Services</a>

    </li>
    <li>
    <a href="index.php?id=29"title="About">About</a>

    </li>
    <li class="last">
    <a href="index.php?id=34"title="Contact">Contact</a>

    And this is the code when hideSubMenu=0:

    <ul class="navigation"><li class="first active">
    <a href="http://www.tunedinconsultancy.com/"title="Home">Home</a>

    </li>
    <li>
    <a href="index.php?id=30"title="Blog">Blog</a>

    </li>
    <li>
    <a href="index.php?id=31"title="Services">Services</a>
    <ul><li class="first">
    <a href="index.php?id=32"title="Business Support">Business Support</a>

    </li>
    <li class="last">
    <a href="index.php?id=33"title="Marketing Services">Marketing Services</a>

    </li>
    </ul>
    </li>
    <li>
    <a href="index.php?id=29"title="About">About</a>

    </li>
    <li class="last">
    <a href="index.php?id=34"title="Contact">Contact</a>

    </li>
    </ul>

    Thinking of sacking off wayfinder and just using html/CSS (i only want a dropdown menu g’darnit) but would really like to get to grips with this snippet as i think it would be invaluable in future projects.

    Hoping (kind of) that this i’ve made a stupid newby error and the solution is obvious to you guys.

    Appreciate your time and help, modx rocks!

    Thanks

    Dan
      • 33968
      • 863 Posts
      First up, add spaces in your rowTpl where indicated as it’s all stringing together in your html:

      <a href="[[+wf.link]]"_title="[[+wf.title]]"_[[+wf.attributes]]>[[+wf.linktext]]</a>

      Clicking through to your site I guess it is the blank ’Services’ page that is the problem. Nothing is wrong with Wayfinder because it’s creating a valid link to that page (id 31). But the page is completely empty (no markup) which suggests you might have a blank template selected. Could you check that first?
        • 13024
        • 0 Posts
        Thanks for your help, I did originally assign a template to the services page but thought maybe somehow that was messing things up as it is only a container, it was the lack of spacing in-between my rowTpl chunk that was the underlying problem.

        First time i’ve used the forum and very happy!

        Cheers

        Dan smiley
          • 33968
          • 863 Posts
          Glad to help smiley

          One thing - I usually call Wayfinder uncached [tt][[!Wayfinder? ... ]][/tt] until I’m happy everything is working fine. Otherwise you can be navigating through your site and seeing a mix-up of old and new menu items which can cause a lot of confusion! That applies to other snippets too.
            • 3109 ☆ A M B ☆
            • 894 Posts
            I recommend you download and read the MODx Wayfinder E-book it will explain to you pretty much all the ins and out of wayfinder.

            Get it here: http://modxcms.com/forums/index.php?action=dlattach;topic=34176.0;attach=9315
              Benjamin Marte
              Interactive Media Developer
              Follow Me on Twitter | Visit my site | Learn MODX