Question
I formulated a formatted search I like so much I want to make it available to everyone using TWiki at my site. I'm sure I'm not the first to work out the search, which isn't the issue here -- it returns a bulleted list of all topics whose names have the current topic's name as a prefix:
%SEARCH{ "^%TOPIC%[A-Za-z0-9]" scope="topic" regex="on" nosearch="on" nototal="on" format=" * [[$topic]]" }%
I thought I could just set a variable to it on my site's
TWikiPreferences, but I can't seem to figure out a formulation that works given the various levels of evaluation involved, the HTML characters, etc. I want to be able to put in a page something like:
More specific discussions can be found at:
%SUBTOPICS%
where
%SUBTOPICS% expands to the search expression above's results relative to the current page.
What am I missing?
- TWiki version: Dec 2001
- Web server:
- Server OS:
- Web browser:
- Client OS:
--
MitchellModel - 13 Nov 2002
Answer
One thing to try is putting the search into a page that is then %INCLUDE%d into the main page. Not quite as easy to write but still encapsulates the complexity of the search text.
--
RichardDonkin - 14 Nov 2002
OK, good enough. Thanks. Seems to work well, and
%INCLUDE{TWiki.SubtopicList}% isn't much worse than
%SUBTOPICS%. --
MitchellModel - 21 Nov 2002