I’m trying to filter my ditto call to only show article templates with a highlighted TV checked value.
My ditto call used is:
[!Ditto? &startID=`0`
&filter=`highlight,yes,2|template,Article,2`
&depth=`100`
&total=`3`
&sortBy=`menuindex`
&sortDir=`ASC`
&tpl=`@FILE:[(base_path)]assets/templates/#####/highlightDitto.chunk`
&tplLast=`@FILE:[(base_path)]assets/templates/#####/highlightLastDitto.chunk`
&noResults=``
&debug=`1`
!]
However this doesn’t work as expected as it fails to filter anything.
Has the filter values changed between Ditto 2.0.1 and 2.1.0 ?
Thanks for any help
Hi,
"template" is a database field that carries numerical value -> you need to check numerical id for your "Article"-template and use it within filter clause &filter=`highlight,yes,2|template,13,2` (where 13 is my sample value).
Edit: also, in order to solve your task, you need to change your comparison mode from 2 to 1; please read carefully filtering manual -- "filter" feature EXCLUDES documents that meet criterion.
Thanks alik clarifying, it’s been awhile since last used filters.
I was looking at ways to include and not exclude items
Is there anyway to filter by template name?