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
--
RichMorin - 14 Jun 2008
Answer
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