Feature Proposal: replace the SPLIT and REPEAT mess in the search templates
Motivation
search.xxx.tmpl
,
searchformat.xxx.tmpl
,
searchmeta.xxx.tmpl
,
searchbookview.xxx.tmpl
all expand to a standalone html document, with header, ADDTOHEAD processing etc.
Then, in 99% of uses, all this is thrown away in some confusing mess of regex
split
code, splitting on the keywords SPLIT and REPEAT.
Description and Documentation
I'd like to replace this by defining the following
-
TMPL:DEF{SEARCH:header}
-
TMPL:DEF{SEARCH:format}
-
TMPL:DEF{SEARCH:footer}
-
TMPL:DEF{SEARCH:pager}
-
TMPL:DEF{SEARCH:searched}
-
TMPL:DEF{SEARCH:count}
- and whatever else is hidden in the code for legacy
-
search.xxx.tmpl
- used for SEARCH
calls with not formatting - needs to be made pretty
-
searchformat.xxx.tmpl
- used for SEARCH
when format
is defined.
-
searchmeta.xxx.tmpl
- used for SEARCHMETA
and might be redundant
-
searchbookview.xxx.tmpl
- used to bookview - which may be turned off by default as it eats your server. (this really could do with being extracted into a custom plugin if it doesn't see much use.
Impact
this change will have no impact on end users
except for those that defined their own tmpl files and haven't upgraded their specification replace the SPLIT.
Implementation
--
Contributors: SvenDowideit - 10 Mar 2010
Discussion
Go for it. Long overdue. Only informal concern is: how do I maintain a skin that must run on engines with a revamped template landscape as well as what we currently have? A context tag for the Foswiki version would solve it...
--
MichaelDaum - 10 Mar 2010
yes, I will take a poke at seeing what alternatives we have wrt skinning for both 1.0 and post. I
hope that we don't have to resort to a version context, as we only have the
eq
operation, not the
gt
we'd really need.
--
SvenDowideit - 10 Mar 2010
Proposal has been accepted by 14-day rule. No concern has been raised.
Go ahead Sven. Remember the feature freeze dead line of 1st of April if you want it in 1.1
--
KennethLavrsen - 24 Mar 2010
core changes done.
--
SvenDowideit - 26 Mar 2010