Output Modifier Issue

In MODX 2.8.4, I’m using pdoResources to pass data and set my totalvar to start counting. It’s returning a 2 as expected, but when I use this:

[[+cardTotal:lt=3:then=There are less than 3 cards:else=There are 3 or more cards]]

or

[[+cardTotal:in=1,2:then=There are less than 3 cards:else=There are 3 or more cards]]

I keep getting the wrong output. I have no idea what’s going wrong here. I simply want to output something specific when the count is lower than a value.

what is your pdoResources call?

[[pdoResources?
    &parents=`173,178,189,190`
    &depth=`0`
    &tpl=`featInsights-tablet`
    &includeTVs=`isFeatured,FeaturedImage,InsightServicesAndIndustries,RelatedServicesAndIndustries,EventServicesAndIndustries`
    &where=`[{"publishedon:>=":"[[!getDate? &offset=`-24 month`]]"}]`
    &tvFilters=`isFeatured==1,InsightServicesAndIndustries==%[[*link_attributes]]%||isFeatured==1,RelatedServicesAndIndustries==%[[*link_attributes]]%||isFeatured==1,EventServicesAndIndustries==%[[*link_attributes]]%`
    &setTotal=`1`
    &totalVar=`cardTotal`
    &toPlaceholder=`trendingInsights-tablet`
]]

I don’t think, this is the issue here, but shouldn’t you call pdoResources and then also the placeholder uncached in that case?

Do you call pdoResources before or after the placeholder?

You have also an uncached snippet call in a property of cached snippet call. That should be avoided.