Summary
Trying to use getResources to find and return resources with a TV set only to a specific value
Issue
Please direct me to where this may have been detailed before…I have been unable to locate a clear demonstration of how this should work.
I have resources with a TV (input type of checkbox) in order to have multiple categories associated to them via that TV. I am using getResources and attempting to use the “&tvFilter” parameter to return only the resources that meet the filter criteria. Instead, I get results of every resource within the specified parent.
My getResources call:
[[!getResources?
&parents=`15`
&depth=`2`
&limit=`15`
&includeTVs=`1`
&processTVs=`1`
&includeContent=`1`
&tvPrefix=``
&tvFilter=`project-category==%access%`
&tpl=`category_slide_tpl`
]]
My TV input options:
Access to Resources==access||Civic and Volunteer Engagement==civic||DEAI==deai||Education and Literacy==education||Elderly and Intergenerational==elderly||Environment-Climate Change and Animals==environment||Health and Wellness==health||Hunger and Homelessness==homeless||Justice-Peace and Safety==justice
My Template Chunk:
<div class="categorySlide">
<div class="category_thumb"><img src="[[+link-to-thumbnail]]" alt="[[+pagetitle]]" width="500" height="280" /></div>
<div class="project_title_bar">[[+introtext]]</div>
</div>
I need help understanding what operation the “&tvFilter” is performing (as it doesn’t behave as I expect), and ultimately, how to get only the results of a given category. It is probable that I have a simple error in syntax, or how I setup my TV, or some other simple problem. Any help pointing out that error is welcome.
Thank you.