We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36671 ☆ A M B ☆
    • 120 Posts
    I'm trying to filter a getResources/getPage call so that it only returns resources that have content in a specific tv, ie. that are not empty. The tv in question is called "product-single-sale-price" - basically it should show all products in a multi-category product catalogue that have a sale price.

    Secondly, I have hideContainers set to true but it still outputs all parent container resources in the results.

    Neither of the above is working for me. The results include every single resource within resource 4 (which is the top level of the catalogue), incl. container resources and those that have nothing in the sales price tv.

    Any pointers highly appreciated.

    getResource is on 1.5.1 and Revo on 2.2.8


    Here is my call :

    [[!getPage?
    &elementClass=`modSnippet`
    &element=`getResources`
    &parents=`4`
    &hideContainers=`1`
    &limit=`16`
    &showHidden=`1`
    &tpl=`productGridTpl`
    &includeTVs=`1`
    &tvFilters=`product-single-sale-price==%`
    &sortby=`menuindex`
    &sortdir=`ASC`
    ]]
      • 33987 ☆ A M B ☆
      • 197 Posts
      What about: &tvFilters=`product-single-sale-price!==` ?

      I'm not sure, but maybe you have to use: includeTVs + includeTVList=`product-single-sale-price` too. Have you ruled out getPage as the 'bad guy' by just doing a getresources call?
        Sterc Internet & Marketing | MODX Founding Partner | Chairman of the MODX Advisory Board

        In need of a MODX consult? Try our MODX Developers Experts!