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

    I'd like to use wayfinder to show resources who have TV with name "important" set to 1

    [[!Wayfinder? &startId=`1` &where=`[{"important = 1"}]`]] is not working...

    I am not familiar with JSON sintax - could somebody please write exactly how should wayfinder command look like?
    thanks
    Mandlc

    This question has been answered by multiple community members. See the first response.

    • discuss.answer
      Wayfinder isn't the correct snippet to use for such a list. Try getResources or pdoResources instead. See this for the "tvFilters" property
      http://rtfm.modx.com/extras/revo/getresources#getResources-SelectionProperties
        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
        • 19872
        • 1,078 Posts
          • 18121
          • 3 Posts
          @sottwell and @mmcgee
          Thanks for pointing me in right direction! You rock!

          In case anybody have similar problem: I've used this:
          [[getResources?
              				    &parents=`[[UltimateParent? &topLevel=`3`]]` 
              				    &tpl=`tpl_sk3_levi_meni_pomembnoTpl`
                                  &showHidden=`1`
                                  &includeTVs=`1`
                                  &processTVs=`1`
                                  &tvFilters=`tv_pomembno==1`
                                  ]]           


          and for template "tpl_sk3_levi_meni_pomembnoTpl", I use this:

          <li>
              <div class="pod_nivo">
                  <a href="[[~[[+id]]]]">[[+pagetitle]]</a>
              </div>        
          </li>


          Thanks again
          Mandlc
          • discuss.answer
            • 4172
            • 5,888 Posts
            And if you need a active class, you can do it with:

            <li [[+id:is=`[[*id]]`:then=`class="active"`:else=``]]>
                <div class="pod_nivo">
                    <a href="[[~[[+id]]]]">[[+pagetitle]]</a>
                </div>       
            </li>
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 18121
              • 3 Posts
              Quote from: Bruno17 at Mar 27, 2015, 09:15 AM
              And if you need a active class...

              Bruno17 many thanks!
              I haven't needed active class UNTIL you in fact show me that I need it very much, smiley smiley

              I'll apply your suggestion on a several places on my website. Thanks again!

              Mandlc