We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40045
    • 534 Posts
    I actually had the same issues with Wayfinder in the manager context here: http://forums.modx.com/thread/79645/sorting-tv-resourcelist-by-title-instead-by-id#dis-post-442125

    Just did not return anything when in the backend. Seems like Wayfinder refues to run in mgr context for whatever reason...I ended up using getResources instead of it^^
      • 24865
      • 289 Posts
      While getResources is a fine solution, it still doesn't solve my original problem. smiley See, while Wayfinder advertises it has "context abilities", it just doesn't work as it should... smiley I think there is a bug somewhere inside switching back to the original context, which messes things up on my end.

      Try it for yourself. Create 2 contexts with 2 resources, call it: &startId=`0`&startIdContext=`othercontext`&contexts=`web,othercontext`
      And after the Wayfinder call, place a link to a resource inside the other (note: not "othercontext") context.


      • web
        [ul]
        [li]Resource (1)
      • Resource 2 (2)
      [/li]
      [li]other

      • Resource 3 (3)
      • Resource 4 (4)
      [/li]
      [/ul]

      Thus, when your Wayfinder is in (1), place a link next to it like so: [[~3]]. smiley That messes things up BIGTIME on my end.
      Oh, also don't forget to create a modContextSetting named "site_url" inside your othercontexts defining a unique URL. Doesn't really have to work I guess.

      /edit
      WOW, this forum has sucky nested UL/LI support. tongue I guess you get my drift.
        @MarkGHErnst

        Developer at Adwise Internetmarketing, the Netherlands.
      • W. Shawn Wilkerson Reply #13, 11 years ago
        Have you thrown &debug=`1` at the Snippet call?

        I remember trying this for my book, and found an issue with it, but that has been some time ago. I would think Shaun to have fixed it by now. Give me a couple of minutes to test it on one of multi-context sites.
          Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

          Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
        • W. Shawn Wilkerson Reply #14, 11 years ago
          Here's your answer if you were wanting to use wayfinder on the front side of the site as intended:

          					[[Wayfinder?
          						&startId=`0`
          						&level=`2`
                                                          &contexts=`backoffice,web`
                                                          &scheme=`full` 
          						&outerTpl=`tpl.Wayfinder.outer`
          						&parentRowTpl=`tpl.Wayfinder.row.parent`
          						&innerRowTpl=`tpl.Wayfinder.row.inner`
          						&rowTpl=`tpl.Wayfinder.row`                    
          					]]


          This works ONLY if you have done the following:

          Added a site_url setting in the default system systems pointed to the "web" context domain name : http://www.domain.tld/ (don't forget the slash)
          Added a site_start setting in each context pointing the context's home page.
          Added a site_url setting in each context with the domain for that context: http://subdomain.domain.tld/ (don't forget the slash)

          The scheme will build a full url for each link based on the context setting site_url, in this way you can have multiple contexts in one menu.

          As far as the Manager is concerned, I see no real point in running Wayfinder, as how are you going to attach styling etc? It is much easier to simply create a Dashboard Widget, as show here: http://www.shawnwilkerson.com/modx-revolution/2012/11/26/site-summary-widget-/-snippet/ [ed. note: wshawn last edited this post 11 years ago.]
            Get your copy of MODX Revolution Building the Web Your Way http://www.sanitypress.com/books/modx-revolution-building-the-web-your-way.html

            Check out my MODX || xPDO resources here: http://www.shawnwilkerson.com
            • 24865
            • 289 Posts
            Thanks Shawn, but I'm not the one using it for backend purposes. smiley
            Unfortunately your solution is already in place here, and isn't working. sad
              @MarkGHErnst

              Developer at Adwise Internetmarketing, the Netherlands.
            • Mark:

              Is the problem with this property?
              startIdContext=`othercontext`

              Since your startId is 0, it should not be specified as from a specific Context...
                • 24865
                • 289 Posts
                Yes, either startIdContext or contexts are messing things up.
                My startIds are 42 and 71. smiley
                  @MarkGHErnst

                  Developer at Adwise Internetmarketing, the Netherlands.
                  • 24865
                  • 289 Posts
                  I even tried a dirty fix, which partially works, but when I echo anywhere after the [[wfMenu]] call (snippet is called that, obviously), for example [[++site_start]], I get the ORIGINAL site start. So no reload, no re-set of placeholders...

                  $sp =& $scriptProperties;
                  
                  $activeContext = $modx->context->get('key');
                  $context = $modx->getOption('wfStartIdContext', $sp, $modx->context->get('key'));
                  
                  $modx->switchContext($context);
                  $menu = $modx->runSnippet('Wayfinder', $sp);
                  $modx->switchContext($activeContext);
                  
                  return $menu;


                  Again, it returns the menu, but I have to force &scheme=`full` which also solved a lot of problems, but still, the native func. doesn't do me any good at this time...
                    @MarkGHErnst

                    Developer at Adwise Internetmarketing, the Netherlands.