Quote from: heliotrope at Nov 16, 2007, 03:50 PM
Hi,
use the &filter param
&filter=`template,mytpl,1`
:-)
You’re right that this will work if I need to limit the query to one template. If I add another filter to increase the scope of the query to include a total of 2 or more templates, though, the &filter doesn’t seem to be sophisticated enough to do what I want it to do. It excludes all documents, because each document has only one template. The &filter query takes all filters into account, returning no results.
I’ve been trying to get the &where parameter to do the filtering for me, but I may be misunderstanding something about that parameter, because it’s not doing what I’m telling it to do.
If I write &where=`template=7` it gives me a fatal MODx parse error. If I write &where=`template = 7` it doesn’t give me the fatal error, but it also doesn’t filter anything. If I write &where=`template = 7 and template = 5` it doesn’t filter either. I’m sure I’m missing something simple. Any advice?
In the end, though, it would be easiest to just do this:
&templates=`5,7`. This syntax would be used instead of &parents or &documents