Tags:
create new tag
view all tags

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

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2002-11-21 - MitchellModel
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.