We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19121
    • 11 Posts
    Hello!

    I have a tv.date template, and I need getResources to show pages with specific dates.

    Something like this:
    &where=`tv.date<’2011-01-15’`

    how should I do this with getResources?

    I know how to do this with publishedon (http://modxcms.com/forums/index.php/topic,57307.0.html),
    but I need a TV date.
      • 22303 MODX Staff
      • 10,725 Posts
      This is not currently supported in getResources. The TV’s are not joined and thus you cannot use that condition in the where clause. Others have requested this feature and it will be added soon. That said, I must still warn you that this will be very inefficient because unlike the datetime fields of the Resource (like publishedon), TV values are not indexed for this purpose. IOW, it will require row scanning each TV value to make the comparison.
        • 1809
        • 15 Posts
        Quote from: OpenGeek at Jan 19, 2011, 10:04 AM

        This is not currently supported in getResources. The TV’s are not joined and thus you cannot use that condition in the where clause. Others have requested this feature and it will be added soon. That said, I must still warn you that this will be very inefficient because unlike the datetime fields of the Resource (like publishedon), TV values are not indexed for this purpose. IOW, it will require row scanning each TV value to make the comparison.

        there would be non need of that if only &tvFilters would work fine (it seems it has a bug with tv default value) and support operators...