Tags:
create new tag
view all tags

Question

I want to list the siblings of a topic.

If I could easily get back the parent topic name (not a link, just the name), I think this would be fairly simple. However, ParentTopicVariable implies that getting the parent topic name is nontrivial (unless this has changed in a year).

Does anyone have a chunk of (Search and Spreadsheet?) code that will give me the siblings of a given topic?

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Missing functionality

-- RichMorin - 14 Jun 2008

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.

VarMETA ("parent") didn't seem to work for me on TWiki 4.2, so I went with this:

<!--
   * Set PARENT = %SEARCH{"%TOPIC%" nonoise="on" scope="topic" format="$parent"}%
-->
Siblings:
%SEARCH{"META\:TOPICPARENT.*\"%PARENT%\"" type="regex" nonoise="on" format="   * [[$topic]]" excludetopic="%TOPIC%"}%

I couldn't get the sequence of escapes worked out to get that onto one line, but it works.

-- SeanCMorgan - 16 Jun 2008

Change status to:
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2008-06-16 - SeanCMorgan
 
  • 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.