Tags:
create new tag
view all tags

Question

I'm trying to execute a formatted search that finds only the first-generation children of a topic. This can easily be done with METASEARCH, but the results are messy. Can this be done? Or is there a work-around? Any help is appreciated.

Environment

TWiki version: TWikiRelease04x00x04
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Documentation

-- TWikiGuest - 10 Oct 2006

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

You can do a formatted SEARCH for a named parent topic. Untested example that lists all child topics of the current topic:

Children: %SEARCH{ "META:TOPICPARENT.*\"%TOPIC%\}" type="regex" nonoise="on" format="[[$topic]]" separator=", " }%

See details in VarSEARCH and FormattedSearch.

-- PeterThoeny - 28 Nov 2006

I don't see that documented in the linked topics.

-- ArthurClemens - 28 Nov 2006

A new case for the SearchPatternCookbook?

-- PeterThoeny - 29 Nov 2006

Just want to say that I've been looking for this solution, and it works. In my search string I simply substituted an actual TopicName for the %TOPIC% variable and put in some additional formatted search result syntax:

%SEARCH{ "META:TOPICPARENT.*\"BetaFeedback"\}" type="regex" nosearch="on" nototal="on" order="modified" reverse="on"  format="| [[$topic]] | $wikiusername | $date |" limit="20" }%
gave me a formatted table with just the child topics of BetaFeedback displayed.

Thanks!

-- DianeSexton - 16 May 2007

Change status to:
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2007-05-16 - DianeSexton
 
  • 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.