No... This doesn't seem to work... Thanks for the quick response though! :)
It seems that when I experiment with different possiblities (ge, gte) they get ignored, showing me the nodes at all depths (even if less than the depth I specify). I would guess that "grater than" and "greater than or equal to" have been not been fully implemented yet, or have a bug in ezp version 3.3-2. Has anyone else had any experiences they could share?
Thanks Paul, but I think those examples are all for working in an equation. I'm trying to work with a fetch statement, so I've no variable to compare it with.
According to the documentation this is posisble (depth defaults to le and I'm am currently using eq to fullfil my needs, though this hinders my future development plans) though it doesn't specify the operators which can be used. The docs I'm referring to are:
[depth]
description - The depth of subnodes to recurse in the subnode tree.
type - integer
required - false
default - 1
[depth_operator]
description - An operator that used to work out which noes to display.
type - string
required - false default - 'le'
I just had a look at the source code, and the only supported depth operator is actually 'eq' (equals). This one results in "depth = $nodeDepth" in the SQL.
Anything else as depth operator results in "depth <= $nodeDepth" ('le' type comparison) in the SQL.
I don't know why the other operators haven't been implemented, but I can't see any reason why they can't be added either.
Hmmm looking at the code I could create an extension to replace the existing ezcontentobjecttreenode.php but it isn't really something I have time to do right now and seeing as I already have a workaround I'll probably leave it for another time.
Is this still an issue? I'm having the same problem, in that only eq seems to work, and gt behaving like a less than. (3.6.0)
Luckily I only need two depths, so a quick workaround is possible by using two fetches and a merge, but at the very least the new documentation should be fixed.