On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • I know i can add &where in wayfinder call like this

      [[Wayfinder? &startId=`0` &level=`1` &where=`{"tv.NavigationPosition:=":1, "OR:tv.NavigationPosition:=":2}` &outerTpl=`@CODE <nav class="main-navigation"><ul class="main-nav">[[+wf.wrapper]]</ul></nav>`]]


    NavigationPosition is my tv, but it returns all not just filter id by where?

    This question has been answered by miomir.dancevic. See the first response.

    [ed. note: miomir.dancevic last edited this post 2 years, 2 months ago.]
      <a href="www.play2web.com" title="izrada web sajtova">Izrada web sajtova</a>
      • If I help you out on these forums I would be very grateful if you would consider rating me on Trustpilot: https://uk.trustpilot.com/review/andytough.com

        email: andy@andytough.com | website: https://andytough.com
      • Can you please show me how?
          <a href="www.play2web.com" title="izrada web sajtova">Izrada web sajtova</a>
        • Based on that discussion on Stackoverflow, the simplest option seems to be pdoMenu, which is an improved alternative to Wayfinder

          With pdoMenu:
          [[pdoMenu? 
            &startId=`0` 
            &level=`1` 
            &includeTVs=`NavigationPosition`
            &where=`{"TVNavigationPosition.value:=":1, "OR:TVNavigationPosition.value:=":2}`
            &outerTpl=`@CODE <nav class="main-navigation"><ul class="main-nav">[[+wf.wrapper]]</ul></nav>`
          ]]


          You will need to install pdoTools for this to work.
            A MODx Fanatic
          • Quote from: treigh at Jan 21, 2017, 09:03 PM
            Based on that discussion on Stackoverflow, the simplest option seems to be pdoMenu, which is an improved alternative to Wayfinder

            With pdoMenu:
            [[pdoMenu? 
              &startId=`0` 
              &level=`1` 
              &includeTVs=`NavigationPosition`
              &where=`{"TVNavigationPosition.value:=":1, "OR:TVNavigationPosition.value:=":2}`
              &outerTpl=`@CODE <nav class="main-navigation"><ul class="main-nav">[[+wf.wrapper]]</ul></nav>`
            ]]


            You will need to install pdoTools for this to work.

            This does not work it return empty, i dont think TVNavigationPosition is correct?

            When i remove WHERE it returns all again, and if i do

            [[*NavigationPosition]] it will return value [ed. note: miomir.dancevic last edited this post 2 years, 2 months ago.]
              <a href="www.play2web.com" title="izrada web sajtova">Izrada web sajtova</a>
            • discuss.answer
              Quote from: treigh at Jan 21, 2017, 09:03 PM
              Based on that discussion on Stackoverflow, the simplest option seems to be pdoMenu, which is an improved alternative to Wayfinder

              With pdoMenu:
              [[pdoMenu? 
                &startId=`0` 
                &level=`1` 
                &includeTVs=`NavigationPosition`
                &where=`{"TVNavigationPosition.value:=":1, "OR:TVNavigationPosition.value:=":2}`
                &outerTpl=`@CODE <nav class="main-navigation"><ul class="main-nav">[[+wf.wrapper]]</ul></nav>`
              ]]


              You will need to install pdoTools for this to work.

              The problem is that when TV value is number it return empty row, i have changed to string, and now work ok like this

                [[pdoMenu? 
              		&startId=`0` 
              		&level=`1` 
              		&includeTVs=`NavigationPosition`
              		&where=`[{"TVNavigationPosition.value:LIKE":"%Both%", "OR:TVNavigationPosition.value:LIKE":"%Bottom%"}]`
              		&outerTpl=`@CODE  <ul class="list-inline">[[+wf.wrapper]]</ul>`
              		]]
                <a href="www.play2web.com" title="izrada web sajtova">Izrada web sajtova</a>
              • For the where property, pdoMenu expects the TV prefix in front of the name of your tv so it knows which table to select. So TVNavigationPosition is technically valid. I'll check when I have chance.
                  A MODx Fanatic
                • The problem is that when TV value is number it return empty row, i have changed to string, and now work ok like this

                  In that case, this should also work:
                  &where=`[{"TVNavigationPosition.value:LIKE":"%1%", "OR:TVNavigationPosition.value:LIKE":"%2%"}]`
                    A MODx Fanatic
                  • Quote from: treigh at Jan 21, 2017, 10:51 PM
                    The problem is that when TV value is number it return empty row, i have changed to string, and now work ok like this

                    In that case, this should also work:
                    &where=`[{"TVNavigationPosition.value:LIKE":"%1%", "OR:TVNavigationPosition.value:LIKE":"%2%"}]`

                    Strange but it does not, again empty value
                      <a href="www.play2web.com" title="izrada web sajtova">Izrada web sajtova</a>
                    • Interesting. At least now you have a workaround.
                        A MODx Fanatic