简体   繁体   中英

Ditto call excludes docs by template-variable

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`
]]

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM