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

    i have question?

    how to call wayfinder in snippet?

    this submenu snippet ==>

    <?php
    //print "$_SESSION[webUser]";
    if($_SESSION[webUser]=="")
    {
    print "";
    }else
    {

    $foo = $modx->getChunk(’SubmenuVideoIndo’);
    return $foo;
    }
    ?>

    i want view submenu but in page view
    [!Wayfinder? &startId=`53` &level=`3` &rowTpl=`SubmenuTPL` &innerTpl=`SubmenuTPL_inner` !]

    can you corection that source..?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      In the snippet, you’ll put:
      $modx->runSnippet('Wayfinder', array('startId'=>0, 'config'=>'name-of-your-config-file'));

      Then in the assets/snippets/wayfinder/configs folder, put an ordinary .php file with the various configuration variables you want to use. See the other example configuration files in that folder for examples.
        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