01565: (:template ! none:) which is only displayed if pages were found
(:template ! none:) which is only displayed if pages were foundDescription:
Don't worry—in the calm before the storm, I just have a small suggestion for improvement:
I'm currently revising my PageListTemplates and trying to convert everything to use the (:template …:) markup.
In the process, I noticed that (:template none:) doesn't support negation—that is, when results are found.
Example:
(:template none:)
Nothing found.
(:template ! none:)
{$$PageCount} pages found out of {$$PageListCount} pages searched.
Negation isn’t supported in the source code, and there’s no mention of it in the documentation.
You can also achieve this with (:if !equal {$$PageCount} 0:), but I’d still find (:template ! none:) to be very practical.
Another idea would be to combine this new (:template:) syntax with the (:if:) statement.
(:if template first:) I’m familiar with the old way using (:if equal {<$Group}:) …, but this would still be a simplification, since you could nest the conditions and combine them with other conditions.
The opposite of (:template none:) is (:template first|each|last:). There is a simpler template instead of (:if equal "{<$Group}" "{=$Group}":) you can now use (:template first {=$Group}:). I'll think about adding (:template ! none:). --Petko