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

    [[getResources?
    &tpl=`news-item`
    &parents=`[[*id]]`
    &limit=`0`
    &sortby=`publishedon`
    &sortdir=`desc`
    &includeTVs=`1`
    &processTVs=`1`
    &includeTVList=`thumbImage,featureImage`
    &includeContent=`1`
    &tvPrefix=``
    &where=`{"template":"17"}`

    ]]

    Current I have this but I would also like to display if the template is 17 or 44.

    How do I do that?

    Thanks!
      • 36996
      • 211 Posts
      try
      &where=`{"template:=":17, "OR:template:=":44}`
        • 45081
        • 2 Posts
        Thanks!! It works!!! you are a star!
          • 42560
          • 49 Posts
          hi,

          why is

          {"class_key:=":modDocument, "OR:class_key:=":modSymLink}

          OR even using with ""...
          {"class_key:=":"modDocument", "OR:class_key:=":"modSymLink"}


          doesnt work? i keep seeing ids wich are weblinks in my results
            • 3749
            • 24,544 Posts
            Try this:

            &where = `[{"class_key":"modDocument"},{"OR:class_key:=":"modSymLink"}]`
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 42560
              • 49 Posts
              Quote from: BobRay at Oct 27, 2017, 03:49 PM
              Try this:

              &where = `[{"class_key":"modDocument"},{"OR:class_key:=":"modSymLink"}]`

              IT works!, thank you so much BobRay,
                • 3749
                • 24,544 Posts
                Glad I could help. For future reference, here's how I got that:

                $x = array(
                    array(
                        'class_key' => 'modDocument'
                    ),
                    array(
                        'OR:class_key:=' => 'modSymLink'
                    )
                );
                
                echo json_encode($x);
                
                exit;


                I ran it in my code editor (PhpStorm), but it could be a snippet if you change 'echo' to 'return'.
                  Did I help you? Buy me a beer
                  Get my Book: MODX:The Official Guide
                  MODX info for everyone: http://bobsguides.com/modx.html
                  My MODX Extras
                  Bob's Guides is now hosted at A2 MODX Hosting