We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2912
    • 315 Posts
    Hi all,
    I'm having an issue with my webpage with 2 wayfinder calls within my template.

    Everything works ok. The first call is my main menu. The second d call is for a sub menu list. When i set a limit of 10. The whole menu disappears. Debug shows it should be ok.

    I cannot seem to find the issue. Would anything spring g to anyone's mind?

    Thanks,
    BBloke

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

      BBloke
      • 13226
      • 953 Posts
      Probably a stupid question but:

      Have you set the startid for the second call ?
      • discuss.answer
        • 2912
        • 315 Posts
        Quote from: iusemodx at Mar 29, 2017, 11:57 AM
        Probably a stupid question but:

        Have you set the startid for the second call ?

        Yes. I have. It's run through config files

        <?php
        $startId			= 14;
        $level				= 1;
        $limit				= 16;
        $textofLinks		= "menutitle";
        $titleofLinks		= "description";
        $displayStart		= true;
        $ignoreHidden		= true;
        //$showPrivate		= true;
        //$debug			= true;
        
        $sortBy = "createdon";
        $sortOrder = "DESC" ;
        
        $parentClass = "hideentry";
        $outerClass = "menu";
        $selfClass = "current";
        
        
        /*BASIC */
        $outerTpl = '@CODE:
        <div>
        <nav id="secondary-navigation">
            <ul>
                [+wf.wrapper+]
            </ul>
        </nav>
        </div>';
        
        $parentRowTpl = '@CODE:<li [+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>
            [+wf.wrapper+]
        </li>';
        
        $innerTpl = '@CODE:<ul>
            [+wf.wrapper+]
        </ul>';
        
        $rowTpl = '@CODE:<li[+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>';
        
        // Not needed as this is in the main CSS of the template
        $cssTpl = '@CODE:<link rel="stylesheet" media="all" type="text/css" href="assets/snippets/wayfinder/configs/titanBasic/titanBasic.css" />';
        ?>


        If I set the limit to less than the above nothing shows up.

        ID 14 is a resource from root which has 1 level of children.

        The template has a chunk which contains the following:

        [[if &is=`[*parent*]:is:14` &then=`[[Wayfinder? &config=`titanBasic` ]]` &else=`{{ShortList}}`]]


        Parent and child pages are cacheable so I clear cache and clear the cache folder to reflect any changes.

        I was expecting the snippet to restrict the number of children being shown by the limit but that's just not happening!

        I have a feeling it's something to do with caching from the template but I just cannot figure it out.
          BBloke
          • 2912
          • 315 Posts
          After trying some things I'm at a total loss.

          The standard no frills snippet with no limit works. After adding some more resources and seeing if things are still working with a limit I find the menu is not displaying. Debugging information is there but no menu!

          I've tried removing the limit. Writing a snippet to pull the last 10 children from the specific parent in the order I wish and pass that to Wayfinder as includeDocs. Nothing shows. Debug information is fine though.

          This is driving me nuts! It would seem there is something I'm missing but just cannot find it.
            BBloke
            • 2912
            • 315 Posts
            As I've just finished typing that it seems the thing I missed was displayStart that was causing the issue! Everything looks ok. [ed. note: BBloke last edited this post 7 years ago.]
              BBloke