NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use
trunk.foswiki.org to view this page for some minimal testing.
Use
Item11746 for general documentation changes for release 1.1.6. Use
Item9693 for docu changes for release 1.2 and 2.0.
Item883: Make the SEARCH zeroresults parameter a format string
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Enhancement |
Closed |
Engine |
SEARCH FORMAT |
|
%SEARCH{
web="System"
"SvenThinksThereShouldBeNoSuchTopic"
nototal="on"
zeroresults="on"
}%
| zeroresults="off" |
Suppress all output if there are no hits |
zeroresults="on", displays: "Number of topics: 0" |
| nototal="on" |
Do not show number of topics found |
Show number |
While the docco is totally vague about what happens when you combine the 2 :/
So I'm thinking that we can take the oportunity to turn
zeroresults into a
format field too
ie,
-
zeroresults="$count results found" would work..
-
zeroresults="off" would show nothing as now
-
zeroresults="on" would show the total when = 0 independently of =nototal
(basically, it would be better if
zeroresults could be used to optionally over-ride
nonoise when otherwise you just get a blank page.)
--
SvenDowideit - 28 Jan 2009
adding unit tests and fix from
Item8785, and then added feature.
--
SvenDowideit - 29 Mar 2010