Ditto call excludes docs by template-variable

210 views Asked by At

I want to exclude all docs in my Ditto call that have a certain template-variable... say tv-1 with a value. Well, it doesnt matter if the TV has a value or not. Just the presence of the TV applied to a specific resource document would already be enough to exclude it. On second thought, the exclusion by "template", for example TPLcourse would also work.

Is that possible?

Currently my working Ditto call is following:

[[Ditto? 
&id=`siblings`
&parents=`[*parent*]`
&filter=`id,[*id*],2`
&depth=`1`
&tpl=`read-more`
&paginate=`1`
&display=`1`
]]
1

There are 1 answers

1
Jako On BEST ANSWER

To filter by template you just have to extend the &filter property.

&filter=`id,[*id*],2|template,5,1`

The second filter part will filter away all resources that don't have the template 5.