+int Conditional_REST_DEPTH(StrBuf *Target, WCTemplputParams *TP)
+{
+ long Depth, IsDepth;
+ long offset = 0;
+ wcsession *WCC = WC;
+
+ if (WCC->Hdr->HR.Handler != NULL)
+ offset ++;
+ Depth = GetTemplateTokenNumber(Target, TP, 2, 0);
+ IsDepth = GetCount(WCC->Directory) + offset;
+
+// LogTemplateError(Target, "bla", 1, TP, "REST_DEPTH: %ld : %ld\n", Depth, IsDepth);
+ if (Depth < 0) {
+ Depth = -Depth;
+ return IsDepth > Depth;
+ }
+ else
+ return Depth == IsDepth;
+}