Test cases:
https://mail.twiki.org/do/search/Sandbox/?search=variable;skin=plain
https://mail.twiki.org/do/search/Sandbox/?search=variable;skin=text
https://mail.twiki.org/do/search/Sandbox/?search=variable;skin=foobar
The last one works OK since he skin does not exist.
Compare with Cairo:
http://twiki.org/cgi-bin/search/Sandbox/?search=variable;skin=plain
http://twiki.org/cgi-bin/search/Sandbox/?search=variable;skin=text
http://twiki.org/cgi-bin/search/Sandbox/?search=variable;skin=foobar
--
PTh
This is nothing to do with skin fallback. The template file is wrong somehow.
Item1300 is a better report of the same thing.
CC
Thanks for fixing
https://mail.twiki.org/do/search/Sandbox/?search=variable;skin=plain
But why does this not work?
https://mail.twiki.org/do/search/Sandbox/?search=variable;skin=text
--
PTh
search.tmpl
is defined to include
view.tmpl
. When
skin=text
that means it includes
view.text.tmpl
, which is defined as just %TEXT%, so it has no %SPLIT% tags. I removed
view.text.tmpl
, but Antonio put it back; apparently he has some applications that depend on it. For the text skin to work with search it needs to define
search.text.tmpl
. I added one, though I can't imagine why you would want to use it.
Note: the whole approach of using %SPLIT% tags is horrible. It would have been much better to instantiate specific templates. i.e. instead of:
my( $tmplHead, $tmplSearch, $tmplTable, $tmplNumber, $tmplTail ) = split( /%SPLIT%/, $tmpl );
it should use
my $tmplHead = $templates->expandTemplate("SEARCH:header");
my $tmplSearch = $templates->expandTemplate("SEARCH:search");
etc
This approach makes the whole thing a lot less sensitive to the structure templates, and a lot easier to debug. I didn't change the code in
DakarRelease, though, for fear of breaking existing skins. Now I wish I had. Ho hum.
CC