We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36562
    • 94 Posts
    Each product resource has a template variable named ProductPopular - It's a checkbox with a default value of 0.
    If you check it in the resource it has the value of 1.

    On a page i place a getResources call looking like the following ( Where par & lim has values ):


    [[getResources?
    &parents=`[[+par]]`
    &sortby=`{"pagetitle":"ASC"}`
    &tpl=`product`
    &limit=`[[+lim]]`
    &includeTVs=`1`
    &includeTVList=`pImage,ProductPopular`
    &where=`{"ProductPopular:=":1}`
    ]]

    What i am trying to do is to filter the products to only display those where the popular product tv has been checked.
    Now , obv this doesnt work. But is there a state such a where command? Or should i just customize it?

    Thanks for your time.

    /w

    This question has been answered by sottwell. See the first response.

      --------------------------------------
      www.williamastrom.se
    • discuss.answer
      • 28042 ☆ A M B ☆
      • 24,524 Posts
        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
        • 36562
        • 94 Posts
        Oh god:) Thank you very much, really appreciate it. I just can not figure out how i missed or forgot that one:) But you just made me realize i really really need my vacation next week:)

        Thanks alot!

          --------------------------------------
          www.williamastrom.se